mobility-toolbox-js 3.0.0-beta.21 → 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/api/StopsAPI.js +1 -1
- package/common/controls/StopFinderControlCommon.js +1 -1
- package/mbt.js +20 -3
- package/mbt.js.map +2 -2
- package/mbt.min.js +2 -2
- package/mbt.min.js.map +2 -2
- package/ol/controls/StopFinderControl.d.ts +2 -2
- package/ol/controls/StopFinderControl.js +1 -1
- package/ol/layers/MaplibreLayer.d.ts +4 -0
- package/ol/layers/MaplibreLayer.js +14 -1
- package/ol/layers/VectorLayer.js +5 -4
- package/ol/mixins/PropertiesLayerMixin.d.ts +1 -0
- package/ol/mixins/PropertiesLayerMixin.js +4 -0
- package/package.json +1 -1
package/api/StopsAPI.js
CHANGED
|
@@ -26,7 +26,7 @@ class StopsAPI extends HttpAPI {
|
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
28
|
constructor(options = {}) {
|
|
29
|
-
super(Object.assign({ url: 'https://api.geops.io/stops/v1/' }
|
|
29
|
+
super(Object.assign(Object.assign({}, options), { url: options.url || 'https://api.geops.io/stops/v1/' }));
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Search for stops.
|
|
@@ -51,7 +51,7 @@ class StopFinderControlCommon {
|
|
|
51
51
|
var _a;
|
|
52
52
|
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
53
53
|
this.abortController = new AbortController();
|
|
54
|
-
// @ts-expect-error
|
|
54
|
+
// @ts-expect-error - Improve ts
|
|
55
55
|
this.search(evt.target.value, this.abortController);
|
|
56
56
|
};
|
|
57
57
|
Object.assign(this.inputElt.style, {
|
package/mbt.js
CHANGED
|
@@ -26510,7 +26510,7 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
26510
26510
|
* @public
|
|
26511
26511
|
*/
|
|
26512
26512
|
constructor(options = {}) {
|
|
26513
|
-
super({ url: "https://api.geops.io/stops/v1/"
|
|
26513
|
+
super({ ...options, url: options.url || "https://api.geops.io/stops/v1/" });
|
|
26514
26514
|
}
|
|
26515
26515
|
/**
|
|
26516
26516
|
* Search for stops.
|
|
@@ -52350,6 +52350,10 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
52350
52350
|
);
|
|
52351
52351
|
}
|
|
52352
52352
|
/** @deprecated */
|
|
52353
|
+
// get olListenersKeys(): EventsKey[] {
|
|
52354
|
+
// return this.olEventsKeys;
|
|
52355
|
+
// }
|
|
52356
|
+
/** @deprecated */
|
|
52353
52357
|
get parent() {
|
|
52354
52358
|
deprecated(
|
|
52355
52359
|
"Layer.parent is deprecated. Use the Layer.get('parent') method instead."
|
|
@@ -52445,9 +52449,10 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
52445
52449
|
this.updateMaplibreMap.bind(this),
|
|
52446
52450
|
150
|
|
52447
52451
|
);
|
|
52452
|
+
updateMaplibreMapDebounced();
|
|
52448
52453
|
this.olEventsKeys.push(
|
|
52449
52454
|
this.on("propertychange", (evt) => {
|
|
52450
|
-
if (/(url|style)/.test(evt.key)) {
|
|
52455
|
+
if (/(url|style|apiKey|apiKeyName)/.test(evt.key)) {
|
|
52451
52456
|
updateMaplibreMapDebounced();
|
|
52452
52457
|
}
|
|
52453
52458
|
})
|
|
@@ -52493,6 +52498,18 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
52493
52498
|
console.error("Error while updating MaplibreMap", e);
|
|
52494
52499
|
}
|
|
52495
52500
|
}
|
|
52501
|
+
set apiKey(newValue) {
|
|
52502
|
+
this.set("apiKey", newValue);
|
|
52503
|
+
}
|
|
52504
|
+
get apiKey() {
|
|
52505
|
+
return this.get("apiKey");
|
|
52506
|
+
}
|
|
52507
|
+
set apiKeyName(newValue) {
|
|
52508
|
+
this.set("apiKeyName", newValue);
|
|
52509
|
+
}
|
|
52510
|
+
get apiKeyName() {
|
|
52511
|
+
return this.get("apiKeyName");
|
|
52512
|
+
}
|
|
52496
52513
|
get maplibreMap() {
|
|
52497
52514
|
deprecated2(
|
|
52498
52515
|
"MaplibreLayer.maplibreMap is deprecated. Use layer.mapLibreMap."
|
|
@@ -54379,7 +54396,7 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
54379
54396
|
features = this.map.getFeaturesAtPixel(pixel, {
|
|
54380
54397
|
hitTolerance: this.hitTolerance || 5,
|
|
54381
54398
|
layerFilter: (l) => l === this.olLayer
|
|
54382
|
-
});
|
|
54399
|
+
}) || [];
|
|
54383
54400
|
}
|
|
54384
54401
|
return Promise.resolve({
|
|
54385
54402
|
coordinate,
|