mobility-toolbox-js 3.0.0-beta.22 → 3.0.0-beta.23
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.
- package/mbt.js +13 -1
- package/mbt.js.map +2 -2
- package/mbt.min.js +1 -1
- package/mbt.min.js.map +2 -2
- package/ol/layers/MaplibreLayer.d.ts +4 -0
- package/ol/layers/MaplibreLayer.js +13 -1
- package/package.json +1 -1
|
@@ -150,6 +150,10 @@ declare class MaplibreLayer extends MaplibreLayer_base {
|
|
|
150
150
|
clone(newOptions: MaplibreLayerOptions): MaplibreLayer;
|
|
151
151
|
getStyle(): string;
|
|
152
152
|
updateMaplibreMap(): void;
|
|
153
|
+
set apiKey(newValue: string);
|
|
154
|
+
get apiKey(): string;
|
|
155
|
+
set apiKeyName(newValue: string);
|
|
156
|
+
get apiKeyName(): string;
|
|
153
157
|
get maplibreMap(): maplibregl.Map | undefined;
|
|
154
158
|
get mbMap(): maplibregl.Map | undefined;
|
|
155
159
|
get style(): string;
|
|
@@ -71,7 +71,7 @@ class MaplibreLayer extends MobilityLayerMixin(MapLibreLayer) {
|
|
|
71
71
|
const updateMaplibreMapDebounced = debounce(this.updateMaplibreMap.bind(this), 150);
|
|
72
72
|
updateMaplibreMapDebounced();
|
|
73
73
|
this.olEventsKeys.push(this.on('propertychange', (evt) => {
|
|
74
|
-
if (/(url|style)/.test(evt.key)) {
|
|
74
|
+
if (/(url|style|apiKey|apiKeyName)/.test(evt.key)) {
|
|
75
75
|
updateMaplibreMapDebounced();
|
|
76
76
|
}
|
|
77
77
|
}));
|
|
@@ -117,6 +117,18 @@ class MaplibreLayer extends MobilityLayerMixin(MapLibreLayer) {
|
|
|
117
117
|
console.error('Error while updating MaplibreMap', e);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
set apiKey(newValue) {
|
|
121
|
+
this.set('apiKey', newValue);
|
|
122
|
+
}
|
|
123
|
+
get apiKey() {
|
|
124
|
+
return this.get('apiKey');
|
|
125
|
+
}
|
|
126
|
+
set apiKeyName(newValue) {
|
|
127
|
+
this.set('apiKeyName', newValue);
|
|
128
|
+
}
|
|
129
|
+
get apiKeyName() {
|
|
130
|
+
return this.get('apiKeyName');
|
|
131
|
+
}
|
|
120
132
|
get maplibreMap() {
|
|
121
133
|
deprecated('MaplibreLayer.maplibreMap is deprecated. Use layer.mapLibreMap.');
|
|
122
134
|
return this.mapLibreMap;
|
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.
|
|
5
|
+
"version": "3.0.0-beta.23",
|
|
6
6
|
"homepage": "https://mobility-toolbox-js.geops.io/",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./index.js",
|