Geoportal Extension for OpenLayers
API Reference

Class: GeoportalMapBox

ol.layer.GeoportalMapBox

Geoportal Layer Mapbox creation

new GeoportalMapBox(options, settings)

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

options for function call.

Name Type Description
layer String

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

configuration Object optional

configuration (cf. example)

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
     ...
});

// Ex. configuration object for TMS Layer
"PLAN.IGN$GEOPORTAIL:GPP:TMS": {
  "hidden": true,
  "queryable": false,
  "serviceParams": {
    "id": "GPP:TMS",
    "version": "1.0.0",
    "serverUrl": {
      "cartes": "https://wxs.ign.fr/cartes/geoportail/tms/1.0.0/"
    }
  },
  "name": "PLAN.IGN",
  "title": "Plan IGN",
  "description": "BDUni tuilée",
  "formats": [
    {
      "current": true,
      "name": "application/x-protobuf"
    }
  ],
  "styles": [
    {
      "name": "standard",
      "title": "Style standard",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/standard.json"
    },
    {
      "name": "classique",
      "title": "Style classique",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/classique.json"
    },
    {
      "name": "transparent",
      "title": "Style transparent",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/transparent.json"
    },
    {
      "name": "accentue",
      "title": "Style accentue",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/accentue.json"
    },
    {
      "name": "attenue",
      "title": "Style attenue",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/attenue.json"
    },
    {
      "name": "gris",
      "title": "Style en noir et blanc",
      "current": false,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/gris.json"
    },
    {
      "name": "epure",
      "title": "Style epure",
      "current": true,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/epure.json"
    },
    {
      "name": "sans_toponymes",
      "title": "Style sans toponymes",
      "current": false,
      "url": "https://wxs.ign.fr/static/vectorTiles/styles/PLAN.IGN/essentiels/sans_toponymes.json"
    }
  ],
  "globalConstraint": {
    "crs": null,
    "bbox": {
      "left": -724011.531917197,
      "right": 1095801.237496279,
      "top": 6672646.821182753,
      "bottom": 5009377.0856973175
    },
    "minScaleDenominator": null,
    "maxScaleDenominator": null
  },
  "quicklookUrl": "https://wxs.ign.fr/static/pictures/ign_carte2.jpg",
  "layerId": "PLAN.IGN$GEOPORTAIL:GPP:TMS",
  "defaultProjection": "EPSG:3857"
}

Extends

  • ol.layer.VectorTile

Methods

getDescription(){String}

Layers/LayerMapBox.js, line 381

Get description

getLegends(){Array}

Layers/LayerMapBox.js, line 365

Get legends

getMetadata(){Array}

Layers/LayerMapBox.js, line 373

Get metadata

getOriginators(){Array}

Layers/LayerMapBox.js, line 405

Get originators

getQuicklookUrl(){String}

Layers/LayerMapBox.js, line 397

Get quicklook url

getTitle(){String}

Layers/LayerMapBox.js, line 389

Get title

onStyleMapBoxError(error)

Layers/LayerMapBox.js, line 354

Error

Name Type Description
error *

message

onStyleMapBoxLoad(style)

Layers/LayerMapBox.js, line 282

Add Style

Name Type Description
style *

json style