UNPKG

geopf-extensions-openlayers

Version:

French Geoportal Extensions for OpenLayers libraries

188 lines 5.85 kB
export default LayerMapBox; /** * @classdesc * Geoportal Layer Mapbox creation * * @alias ol.layer.GeoportalMapBox * */ declare class LayerMapBox extends VectorTileLayer<VectorTileSource<any>, any> { /** * @module GeoportalMapBox * @constructor * @param {Object} options - options for function call. * @param {String} options.layer - Layer name (e.g. "PLAN.IGN") * @param {Object} [options.configuration] - configuration (cf. example) * @param {String} [options.style] - Style name (e.g. "classique") * @param {String} [options.source] - Source name (e.g. "plan_ign") * @param {Boolean} [options.ssl] - if set true, enforce protocol https (only for nodejs) * @param {Object} [settings] - other options for ol.layer.VectorTile function (see {@link https://openlayers.org/en/latest/apidoc/module-ol_layer_VectorTile-VectorTileLayer.html ol.layer.VectorTile}) * @fires mapbox:style:loaded * @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" * } */ constructor(options: { layer: string; configuration?: any; style?: string | undefined; source?: string | undefined; ssl?: boolean | undefined; }, settings?: any); name: string; service: string; protocol: string; sourceId: string | undefined; styleUrl: any; styleName: string | undefined; config: any; /** * Get Style MapBox * @private */ private setStyleMapBox; /** * Add Style * @param {*} style - json style */ onStyleMapBoxLoad(style: any): void; /** * Error * @param {*} error - message */ onStyleMapBoxError(error: any): void; /** * Get configuration * @returns {Object} - configuration */ getConfiguration(): any; /** * Get legends * @returns {Array} - legends */ getLegends(): any[]; /** * Get metadata * @returns {Array} - metadata */ getMetadata(): any[]; /** * Get description * @returns {String} - description */ getDescription(): string; /** * Get title * @returns {String} - title */ getTitle(): string; /** * Get quicklook url * @returns {String} - quicklook */ getQuicklookUrl(): string; /** * Get originators * @returns {Array} - originators */ getOriginators(): any[]; } import VectorTileSource from "ol/source/VectorTile"; import VectorTileLayer from "ol/layer/VectorTile"; //# sourceMappingURL=LayerMapBox.d.ts.map