mobility-toolbox-js 3.0.0-beta.13 → 3.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -169,7 +169,7 @@ declare class MaplibreStyleLayer extends MaplibreStyleLayer_base {
169
169
  * @param {FilterFunction} [options.layersFilter] Filter function to decide which style layer to apply visiblity on. If not provided, the 'layers' property is used.
170
170
  * @param {FilterFunction} [options.queryRenderedLayersFilter] Filter function to decide which style layer are available for query.
171
171
  */
172
- constructor(options: MaplibreStyleLayerOptions);
172
+ constructor(options?: MaplibreStyleLayerOptions);
173
173
  createRenderer(): MaplibreStyleLayerRenderer;
174
174
  /**
175
175
  * Initialize the layer.
@@ -105,8 +105,17 @@ class MaplibreStyleLayer extends MobilityLayerMixin(Layer) {
105
105
  * @param {FilterFunction} [options.layersFilter] Filter function to decide which style layer to apply visiblity on. If not provided, the 'layers' property is used.
106
106
  * @param {FilterFunction} [options.queryRenderedLayersFilter] Filter function to decide which style layer are available for query.
107
107
  */
108
- constructor(options) {
109
- super(Object.assign({ source: new Source({}) }, (options || {})));
108
+ constructor(options = {}) {
109
+ /** Manage renamed property for backward compatibility with v2 */
110
+ if (options.mapboxLayer) {
111
+ // eslint-disable-next-line no-console
112
+ console.warn('options.mapboxLayer is deprecated. Use options.maplibreLayer instead.');
113
+ // eslint-disable-next-line no-param-reassign
114
+ options.maplibreLayer = options.mapboxLayer;
115
+ // eslint-disable-next-line no-param-reassign
116
+ delete options.mapboxLayer;
117
+ }
118
+ super(Object.assign({ source: new Source({}) }, options));
110
119
  this.highlightedFeatures = [];
111
120
  this.selectedFeatures = [];
112
121
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mobility-toolbox-js",
3
3
  "license": "MIT",
4
4
  "description": "Toolbox for JavaScript applications in the domains of mobility and logistics.",
5
- "version": "3.0.0-beta.13",
5
+ "version": "3.0.0-beta.14",
6
6
  "homepage": "https://mobility-toolbox-js.geops.io/",
7
7
  "exports": {
8
8
  ".": "./index.js",