yio-map 0.14.2 → 0.15.1

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/README.md CHANGED
@@ -28,7 +28,13 @@ npm i yio-map
28
28
  import 'yio-map';
29
29
  ```
30
30
 
31
- When using a bundler, `ol` and `ol-mapbox-style` are expected as peer dependencies.
31
+ When using a bundler, `ol` (`^10.11.0`) and `ol-mapbox-style` (`^13.9.0`) are expected as peer dependencies.
32
+
33
+ ### Style requirements
34
+
35
+ Every layer in the `contentMap` style must declare a valid `type` (e.g. `circle`, `line`, `fill`). Since `ol-mapbox-style` 13.9, a single layer without a `type` makes the whole style fail to load; the error is logged to the console.
36
+
37
+ See [CHANGELOG.md](CHANGELOG.md) for breaking changes between versions.
32
38
 
33
39
  ## Attributes
34
40
 
@@ -42,7 +48,7 @@ When using a bundler, `ol` and `ol-mapbox-style` are expected as peer dependenci
42
48
  | `enableSelect` | `boolean` | Enable feature selection on click/hover |
43
49
  | `editCreate` | `string` | Source layer name to draw new features on |
44
50
  | `editModify` | `number[]` | Feature IDs enabled for editing |
45
- | `geojsonSources` | `object\|string` | GeoJSON data or URL to overlay |
51
+ | `geojsonSources` | `object\|string` | GeoJSON data or URL to overlay, by source id of the content map. A source without a layer in the content map is ignored with a console warning (once per content map). |
46
52
  | `sourceLayerVisibility` | `object` | Toggle visibility of source layers |
47
53
  | `lang` | `string` | Override UI language (defaults to `<html lang>`, then browser language, then `en`). Supported: `en`, `de` |
48
54
 
@@ -1 +1 @@
1
- {"version":3,"file":"YioMap.d.ts","sourceRoot":"","sources":["../src/YioMap.js"],"names":[],"mappings":"AAqBA;IACE,yCAmCE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF,sBAAsB;IACtB,kBADW,OAAO,CACO;IA6EvB,iBAAoB;IACpB,aAAa;IACb,kBAAoB;IAYtB;;OAEG;IACH,oBAFa,UAAU,CAItB;IAED;;OA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"file":"AddressSearch.d.ts","sourceRoot":"","sources":["../../src/controls/AddressSearch.js"],"names":[],"mappings":"AAQA;IACE,yCAOE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAaE;IAWA,oBAAoB;IACpB,wBAA2B;IAC3B,wBAAwB;IACxB,eAAqB;IACrB,eAAgB;IAChB,gBAAkB;IAClB,kBAAqB;IACrB,sBAAyB;IACzB,eAAkB;IAClB,sBAAsB;IAmQxB,+CAqBC;;CACF;2BA5UgD,KAAK"}
1
+ {"version":3,"file":"AddressSearch.d.ts","sourceRoot":"","sources":["../../src/controls/AddressSearch.js"],"names":[],"mappings":"AAOA;IACE,yCAOE;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAaE;IAWA,oBAAoB;IACpB,wBAA2B;IAC3B,wBAAwB;IACxB,eAAqB;IACrB,eAAgB;IAChB,gBAAkB;IAClB,kBAAqB;IACrB,sBAAyB;IACzB,eAAkB;IAClB,sBAAsB;IA4QxB,+CAqBC;;CACF;2BApVgD,KAAK"}
@@ -1,10 +1,12 @@
1
+ /** @typedef {import('./AddressSearch.js').AddressSearch} AddressSearch */
1
2
  export default class AddressSearchControl extends Control {
2
3
  constructor(options?: {});
3
4
  /** @type {AddressSearch} */
4
5
  searchElement: AddressSearch;
5
6
  set lang(value: any);
6
7
  setMap(map: any): void;
8
+ #private;
7
9
  }
10
+ export type AddressSearch = import("./AddressSearch.js").AddressSearch;
8
11
  import Control from 'ol/control/Control.js';
9
- import { AddressSearch } from './AddressSearch.js';
10
12
  //# sourceMappingURL=AddressSearchControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddressSearchControl.d.ts","sourceRoot":"","sources":["../../src/controls/AddressSearchControl.js"],"names":[],"mappings":"AAIA;IAIE,0BAaC;IAhBD,4BAA4B;IAC5B,eADW,aAAa,CACV;IAiBd,qBAEC;IAED,uBAYC;CACF;oBAxCmB,uBAAuB;8BAEb,oBAAoB"}
1
+ {"version":3,"file":"AddressSearchControl.d.ts","sourceRoot":"","sources":["../../src/controls/AddressSearchControl.js"],"names":[],"mappings":"AAMA,0EAA0E;AAE1E;IAIE,0BAaC;IAhBD,4BAA4B;IAC5B,eADW,aAAa,CACV;IAiBd,qBAEC;IAKD,uBAkBC;;CACF;4BA/Ca,OAAO,oBAAoB,EAAE,aAAa;oBANpC,uBAAuB"}
@@ -34,6 +34,7 @@ export default class LayerControl extends Control {
34
34
  * Hides the layer selection with a fade-out animation
35
35
  */
36
36
  fadeOutAndHide(): void;
37
+ #private;
37
38
  }
38
39
  export type LayerItem = {
39
40
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"LayerControl.d.ts","sourceRoot":"","sources":["../../src/controls/LayerControl.js"],"names":[],"mappings":"AASA;;;;;;;GAOG;AAEH;IACE;;OAEG;IACH,+BA8BC;IAyFD;;OAEG;IACH,qBAFU,cAAc,CAEG;IA1F3B,wBAmEE;IAEF;;OAEG;IACH,gBAFU,UAAU,CAEL;IAEf,uBAWC;IAOD;;OAEG;IACH,mCAFW,OAAO,EA0BjB;IAED;;OAEG;IACH,6BAFa,OAAO,CAInB;IAED,6BAEC;IAED;;OAEG;IACH,uBAOC;CACF;;UA1La,MAAM;WACN,MAAM;eACN,MAAM,YAAC;WACP,SAAS,GAAC,UAAU;kBACpB,cAAc;;oBAdR,uBAAuB;uBAGpB,mBAAmB;sBAFpB,kBAAkB"}
1
+ {"version":3,"file":"LayerControl.d.ts","sourceRoot":"","sources":["../../src/controls/LayerControl.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AAEH;IACE;;OAEG;IACH,+BA8BC;IAyFD;;OAEG;IACH,qBAFU,cAAc,CAEG;IA1F3B,wBAmEE;IAEF;;OAEG;IACH,gBAFU,UAAU,CAEL;IAEf,uBAWC;IAOD;;OAEG;IACH,mCAFW,OAAO,EAwBjB;IAKD;;OAEG;IACH,6BAFa,OAAO,CAInB;IAED,6BAEC;IAED;;OAEG;IACH,uBAOC;;CACF;;UA3La,MAAM;WACN,MAAM;eACN,MAAM,YAAC;WACP,SAAS,GAAC,UAAU;kBACpB,cAAc;;oBAfR,uBAAuB;uBAGpB,mBAAmB;sBAFpB,kBAAkB"}
@@ -7,7 +7,7 @@ export default class UserEditInteraction extends Interaction {
7
7
  * @param {Options} options
8
8
  */
9
9
  constructor(options: Options);
10
- getEditLayer(): VectorLayer<import("ol/source.js").Vector<any>, any>;
10
+ getEditLayer(): import("ol/layer/Vector.js").default<import("ol/source.js").Vector<any>, any>;
11
11
  /**
12
12
  * clears features that were modified
13
13
  */
@@ -18,7 +18,16 @@ export default class UserEditInteraction extends Interaction {
18
18
  clearCreatedFeatures(): void;
19
19
  drawInteraction: any;
20
20
  modifyInteraction: any;
21
- setActive(active: any): Promise<void>;
21
+ /**
22
+ * @param {boolean} active
23
+ * @returns {Promise<void>}
24
+ */
25
+ setActive(active: boolean): Promise<void>;
26
+ /**
27
+ * Re-activates editing for a new content map, or activates it if it waited for the first one.
28
+ * @returns {Promise<void>}
29
+ */
30
+ contentChanged(): Promise<void>;
22
31
  get createEnabled(): boolean;
23
32
  setCreateEnabled(value: any): Promise<void>;
24
33
  get modifyEnabled(): boolean;
@@ -29,5 +38,4 @@ export type Options = {
29
38
  yioMap: import("../YioMap.js").YioMap;
30
39
  };
31
40
  import Interaction from 'ol/interaction/Interaction.js';
32
- import VectorLayer from 'ol/layer/Vector.js';
33
41
  //# sourceMappingURL=UserEditInteraction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserEditInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserEditInteraction.js"],"names":[],"mappings":"AAeA;;;GAGG;AAEH;IA6DE;;OAEG;IACH,qBAFW,OAAO,EAKjB;IAnDD,qEAEC;IAED;;OAEG;IACH,8BAOC;IAED;;OAEG;IACH,6BAMC;IA4BD,qBAAgB;IAEhB,uBAAkB;IA6DlB,sCA4FC;IAED,6BAEC;IAED,4CAeC;IAED,6BAEC;IAED,0CAeC;;CA+DF;;YA5Ua,OAAO,cAAc,EAAE,MAAM;;wBAjBnB,+BAA+B;wBAC/B,oBAAoB"}
1
+ {"version":3,"file":"UserEditInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserEditInteraction.js"],"names":[],"mappings":"AASA;;;GAGG;AAEH;IAmEE;;OAEG;IACH,qBAFW,OAAO,EAKjB;IAzDD,8FAEC;IAED;;OAEG;IACH,8BAUC;IAED;;OAEG;IACH,6BASC;IA4BD,qBAAgB;IAEhB,uBAAkB;IAoElB;;;OAGG;IACH,kBAHW,OAAO,GACL,OAAO,CAAC,IAAI,CAAC,CAWzB;IAED;;;OAGG;IACH,kBAFa,OAAO,CAAC,IAAI,CAAC,CAiBzB;IAkHD,6BAEC;IAED,4CAeC;IAED,6BAEC;IAED,0CAeC;;CA+DF;;YA/Ya,OAAO,cAAc,EAAE,MAAM;;wBAXnB,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserPinInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserPinInteraction.js"],"names":[],"mappings":"AAQA;;;GAGG;AAEH;IAQE;;OAEG;IACH,qBAFW,OAAO,EAMjB;IAED,uBAUC;IAqCD,6BAKC;IAED;;;OAGG;IACH,mBAFW,KAAK,CAAC,MAAM,CAAC,QAIvB;;CAYF;;YA5Fa,OAAO,cAAc,EAAE,MAAM;;wBAVnB,+BAA+B"}
1
+ {"version":3,"file":"UserPinInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserPinInteraction.js"],"names":[],"mappings":"AAQA;;;GAGG;AAEH;IAQE;;OAEG;IACH,qBAFW,OAAO,EAMjB;IAED,uBASC;IAqCD,6BAKC;IAED;;;OAGG;IACH,mBAFW,KAAK,CAAC,MAAM,CAAC,QAIvB;;CAaF;;YA5Fa,OAAO,cAAc,EAAE,MAAM;;wBAVnB,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserSelectInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserSelectInteraction.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;IAQE;;OAEG;IACH,qBAFW,OAAO,EAWjB;IAED,uBAUC;IAgED,6BAQC;;CACF;;YA5Ga,OAAO,cAAc,EAAE,MAAM;;wBAPnB,+BAA+B"}
1
+ {"version":3,"file":"UserSelectInteraction.d.ts","sourceRoot":"","sources":["../../src/controls/UserSelectInteraction.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;IAQE;;OAEG;IACH,qBAFW,OAAO,EAWjB;IAED,uBASC;IAiED,6BAQC;;CACF;;YA5Ga,OAAO,cAAc,EAAE,MAAM;;wBAPnB,+BAA+B"}
@@ -1,3 +1,8 @@
1
- export const YioAttribution: Attribution;
1
+ /**
2
+ * Creates the yio attribution control. A control can only belong to one map,
3
+ * so every map needs its own instance.
4
+ * @returns {Attribution}
5
+ */
6
+ export function createYioAttribution(): Attribution;
2
7
  import Attribution from 'ol/control/Attribution.js';
3
8
  //# sourceMappingURL=YioAttribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"YioAttribution.d.ts","sourceRoot":"","sources":["../../src/controls/YioAttribution.js"],"names":[],"mappings":"AASA,yCA0CG;wBAnDqB,2BAA2B"}
1
+ {"version":3,"file":"YioAttribution.d.ts","sourceRoot":"","sources":["../../src/controls/YioAttribution.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wCAFa,WAAW,CAYvB;wBAnBuB,2BAA2B"}