mobility-toolbox-js 3.0.0-beta.24 → 3.0.0-beta.25

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.
@@ -14,7 +14,7 @@ declare const Layer_base: {
14
14
  set copyrights(newCopyrights: string | string[]);
15
15
  disabled: boolean;
16
16
  readonly group: string;
17
- readonly hitTolerance: number;
17
+ hitTolerance: number;
18
18
  readonly key: string;
19
19
  readonly map: import("ol").Map;
20
20
  readonly name: string;
@@ -23,7 +23,7 @@ declare const MaplibreLayer_base: {
23
23
  set copyrights(newCopyrights: string | string[]);
24
24
  disabled: boolean;
25
25
  readonly group: string;
26
- readonly hitTolerance: number;
26
+ hitTolerance: number;
27
27
  readonly key: string;
28
28
  readonly map: OlMap;
29
29
  readonly name: string;
@@ -29,7 +29,7 @@ declare const MaplibreStyleLayer_base: {
29
29
  set copyrights(newCopyrights: string | string[]);
30
30
  disabled: boolean;
31
31
  readonly group: string;
32
- readonly hitTolerance: number;
32
+ hitTolerance: number;
33
33
  readonly key: string;
34
34
  readonly map: Map;
35
35
  readonly name: string;
@@ -52,6 +52,20 @@ class MaplibreStyleLayer extends MobilityLayerMixin(Layer) {
52
52
  // eslint-disable-next-line no-param-reassign
53
53
  delete options.mapboxLayer;
54
54
  }
55
+ if (options.styleLayers) {
56
+ deprecated('options.styleLayers is deprecated. Use options.layers instead.');
57
+ // eslint-disable-next-line no-param-reassign
58
+ options.layers = options.styleLayers;
59
+ // eslint-disable-next-line no-param-reassign
60
+ delete options.styleLayers;
61
+ }
62
+ if (options.styleLayersFilter) {
63
+ deprecated('options.styleLayersFilter is deprecated. Use options.layersFilter instead.');
64
+ // eslint-disable-next-line no-param-reassign
65
+ options.layersFilter = options.styleLayersFilter;
66
+ // eslint-disable-next-line no-param-reassign
67
+ delete options.styleLayersFilter;
68
+ }
55
69
  super(Object.assign({ source: new Source({}) }, options));
56
70
  this.highlightedFeatures = [];
57
71
  this.selectedFeatures = [];
@@ -100,7 +100,7 @@ declare const RealtimeLayer_base: {
100
100
  set copyrights(newCopyrights: string | string[]);
101
101
  disabled: boolean;
102
102
  readonly group: string;
103
- readonly hitTolerance: number;
103
+ hitTolerance: number;
104
104
  readonly key: string;
105
105
  readonly map: Map;
106
106
  readonly name: string;
@@ -17,7 +17,7 @@ declare function MobilityLayerMixin<TBase extends Layerable>(Base: TBase): {
17
17
  set copyrights(newCopyrights: string | string[]);
18
18
  disabled: boolean;
19
19
  readonly group: string;
20
- readonly hitTolerance: number;
20
+ hitTolerance: number;
21
21
  readonly key: string;
22
22
  readonly map: import("ol").Map;
23
23
  readonly name: string;
@@ -52,7 +52,7 @@ declare function PropertiesLayerMixin<TBase extends Layerable>(Base: TBase): {
52
52
  /** @deprecated */
53
53
  readonly group: string;
54
54
  /** @deprecated */
55
- readonly hitTolerance: number;
55
+ hitTolerance: number;
56
56
  readonly key: string;
57
57
  readonly map: Map;
58
58
  /** @deprecated */
@@ -130,6 +130,11 @@ function PropertiesLayerMixin(Base) {
130
130
  deprecated('Layer.hitTolerance is deprecated.Pass the hitTolerance when you request the features.');
131
131
  return this.get('hitTolerance') || 5;
132
132
  }
133
+ /** @deprecated */
134
+ set hitTolerance(newValue) {
135
+ deprecated('Layer.hitTolerance is deprecated.Pass the hitTolerance when you request the features.');
136
+ this.set('hitTolerance', newValue);
137
+ }
133
138
  get key() {
134
139
  return this.get('key') || this.get('name') || getUid(this);
135
140
  }
@@ -19,7 +19,7 @@ export default class MaplibreStyleLayerRenderer extends LayerRenderer {
19
19
  forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback) {
20
20
  const features = this.getFeaturesAtCoordinate(coordinate, hitTolerance);
21
21
  features.forEach((feature) => {
22
- // @ts-expect-error
22
+ // @ts-expect-error improve ts types
23
23
  callback(feature, this.layer_, feature.getGeometry());
24
24
  });
25
25
  return features === null || features === void 0 ? void 0 : features[0];
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.24",
5
+ "version": "3.0.0-beta.25",
6
6
  "homepage": "https://mobility-toolbox-js.geops.io/",
7
7
  "exports": {
8
8
  ".": "./index.js",