Geoportal Extension for Leaflet API Reference

Module: Layers

L.geoportalLayer

Geoportal Layers Factory to be used together with Leaflet Maps.

Example

var map = L.Map(...) ;
var layer = L.geoportalLayer.WMTS({
     layer : "ORTHOIMAGERY.ORTHOPHOTOS",
}).addTo(map) ;

Methods

staticWMS(options, settings){L.geoportalLayer.WMS}

Leaflet/Layers/Layers.js, line 88

Factory function for Geoportal or INSPIRE WMS Layers creation.

Name Type Description
options Object

options for function call.

Name Type Description
layer String

layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS")

ssl Boolean optional

if set true, enforce protocol https (only for nodejs)

apiKey String optional

access key to Geoportal platform, obtained here.

settings Object optional

other options for L.TileLayer.WMS function (see http://leafletjs.com/reference.html#tilelayer-wms-options)

Returns:
layer
Example
var map = L.Map('divmap').setView();
 var lyr = L.geoportalLayer.WMS(
   {
     layer : "OI.OrthoimageCoverage"
   },
   {
     opacity : 1,
     transparent : true,
     minZoom : 1,
     maxZoom : 21
     ...
   });

 lyr.addTo(map); // ou map.addLayer(lyr);

staticWMTS(options, settings){L.geoportalLayer.WMTS}

Leaflet/Layers/Layers.js, line 187

Factory function for Geoportal WMTS Layers creation.

Name Type Description
options Object

options for function call.

Name Type Description
layer String

layer name (e.g. "ORTHOIMAGERY.ORTHOPHOTOS")

ssl Boolean optional

if set true, enforce protocol https (only for nodejs)

apiKey String optional

access key to Geoportal platform, obtained here.

settings Object optional

other options for L.TileLayer function (see http://leafletjs.com/reference.html#tilelayer-options)

Returns:
layer
Example
var map = L.Map('divmap').setView();
 var lyr = L.geoportalLayer.WMTS(
   {
     layer : "ORTHOIMAGERY.ORTHOPHOTOS"
   },
   {
     opacity : 1,
     transparent : true,
     minZoom : 1,
     maxZoom : 21
     ...
   });

 lyr.addTo(map); // ou map.addLayer(lyr);