Geoportal Extension for OpenLayers API Reference

Class: GeoportalMapBox

ol.layer.GeoportalMapBox

Geoportal Layer Mapbox creation

new GeoportalMapBox(options, settings)

OpenLayers/Layers/LayerMapBox.js, line 41
Name Type Description
options Object

options for function call.

Name Type Description
layer String

Layer name (e.g. "PLAN.IGN")

style String optional

Style name (e.g. "classique")

source String optional

Source name (e.g. "plan_ign")

ssl Boolean optional

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

settings Object optional

other options for ol.layer.VectorTile function (see ol.layer.VectorTile)

Example
var LayerMapBox = new ol.layer.GeoportalMapBox({
     layer  : "PLAN.IGN",
     [style  : "classique",]
     [source : "plan_ign",]
     [ssl: true]
}, {
     opacity
     visible
     extent
     declutter
     ...
});

Extends

  • ol.layer.VectorTile

Methods

onStyleMapBoxError(error)

OpenLayers/Layers/LayerMapBox.js, line 358

Error

Name Type Description
error *

message

onStyleMapBoxLoad(style)

OpenLayers/Layers/LayerMapBox.js, line 284

Add Style

Name Type Description
style *

json style