@maptiler/geocoding-control 2.0.0 → 2.1.0-rc1

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.
Files changed (118) hide show
  1. package/MapLibreBasedGeocodingControl.d.ts +3027 -27
  2. package/icons/10pin.svg +4 -1
  3. package/icons/9pin.svg +4 -1
  4. package/icons/alcohol.svg +1 -1
  5. package/icons/alpine_hut.svg +1 -1
  6. package/icons/apartment.svg +4 -1
  7. package/icons/area.svg +1 -5
  8. package/icons/artwork.svg +4 -1
  9. package/icons/beauty.svg +14 -1
  10. package/icons/bicycle_repair_station.svg +18 -1
  11. package/icons/biergarten.svg +4 -1
  12. package/icons/books.svg +14 -1
  13. package/icons/bowl.svg +4 -1
  14. package/icons/bowling_alley.svg +4 -1
  15. package/icons/bus_station.svg +1 -1
  16. package/icons/camping.svg +1 -1
  17. package/icons/car_repair.svg +14 -1
  18. package/icons/car_wash.svg +19 -1
  19. package/icons/cave_entrance.svg +15 -1
  20. package/icons/chalet.svg +1 -1
  21. package/icons/chemist.svg +14 -1
  22. package/icons/church.svg +4 -1
  23. package/icons/community_centre.svg +20 -1
  24. package/icons/firestation.svg +4 -1
  25. package/icons/guest_house.svg +29 -8
  26. package/icons/hotel.svg +1 -1
  27. package/icons/housenumber.svg +19 -14
  28. package/icons/hut.svg +1 -4
  29. package/icons/medical_supply.svg +20 -1
  30. package/icons/memorial.svg +14 -1
  31. package/icons/motel.svg +19 -1
  32. package/icons/post.svg +1 -1
  33. package/icons/post_office.svg +1 -1
  34. package/icons/postal_code.svg +1 -23
  35. package/icons/public_bookcase.svg +14 -1
  36. package/icons/public_building.svg +4 -1
  37. package/icons/shintoist.svg +1 -1
  38. package/icons/street.svg +11 -14
  39. package/icons/vehicle_inspection.svg +18 -1
  40. package/icons/wilderness_hut.svg +1 -1
  41. package/leaflet-controller.d.ts +1 -1
  42. package/leaflet-controller.js +113 -110
  43. package/leaflet-controller.js.map +1 -1
  44. package/leaflet-controller.umd.js +2 -2
  45. package/leaflet-controller.umd.js.map +1 -1
  46. package/leaflet.d.ts +58 -5
  47. package/leaflet.js +1438 -1265
  48. package/leaflet.js.map +1 -1
  49. package/leaflet.umd.js +3 -3
  50. package/leaflet.umd.js.map +1 -1
  51. package/maplibregl-controller.d.ts +1 -1
  52. package/maplibregl-controller.js +483 -469
  53. package/maplibregl-controller.js.map +1 -1
  54. package/maplibregl-controller.umd.js +3 -3
  55. package/maplibregl-controller.umd.js.map +1 -1
  56. package/maplibregl.d.ts +2499 -13
  57. package/maplibregl.js +2435 -2139
  58. package/maplibregl.js.map +1 -1
  59. package/maplibregl.umd.js +3 -3
  60. package/maplibregl.umd.js.map +1 -1
  61. package/maptilersdk.d.ts +2499 -13
  62. package/maptilersdk.js +2432 -2139
  63. package/maptilersdk.js.map +1 -1
  64. package/maptilersdk.umd.js +3 -3
  65. package/maptilersdk.umd.js.map +1 -1
  66. package/openlayers-controller.d.ts +1 -1
  67. package/openlayers-controller.js +66 -63
  68. package/openlayers-controller.js.map +1 -1
  69. package/openlayers-controller.umd.js +2 -2
  70. package/openlayers-controller.umd.js.map +1 -1
  71. package/openlayers.d.ts +53 -1
  72. package/openlayers.js +2046 -1902
  73. package/openlayers.js.map +1 -1
  74. package/openlayers.umd.js +3 -3
  75. package/openlayers.umd.js.map +1 -1
  76. package/package.json +28 -28
  77. package/react.d.ts +31 -5
  78. package/react.js +1252 -1096
  79. package/react.js.map +1 -1
  80. package/react.umd.js +1 -1
  81. package/react.umd.js.map +1 -1
  82. package/style.css +1 -1
  83. package/svelte/FeatureItem.svelte +60 -13
  84. package/svelte/FeatureItem.svelte.d.ts +4 -4
  85. package/svelte/GeocodingControl.svelte +166 -98
  86. package/svelte/GeocodingControl.svelte.d.ts +36 -16
  87. package/svelte/MapLibreBasedGeocodingControl.d.ts +3027 -27
  88. package/svelte/MapLibreBasedGeocodingControl.js +154 -21
  89. package/svelte/leaflet-controller.d.ts +1 -1
  90. package/svelte/leaflet-controller.js +6 -3
  91. package/svelte/leaflet.d.ts +58 -5
  92. package/svelte/leaflet.js +52 -21
  93. package/svelte/maplibregl-controller.d.ts +1 -1
  94. package/svelte/maplibregl-controller.js +47 -38
  95. package/svelte/maplibregl.d.ts +2499 -13
  96. package/svelte/maplibregl.js +11 -3
  97. package/svelte/maptilersdk.d.ts +2499 -13
  98. package/svelte/maptilersdk.js +11 -3
  99. package/svelte/openlayers-controller.d.ts +1 -1
  100. package/svelte/openlayers-controller.js +7 -4
  101. package/svelte/openlayers.d.ts +53 -1
  102. package/svelte/openlayers.js +66 -48
  103. package/svelte/react.d.ts +31 -5
  104. package/svelte/react.js +21 -9
  105. package/svelte/types.d.ts +106 -35
  106. package/svelte/vanilla.d.ts +46 -2
  107. package/svelte/vanilla.js +66 -10
  108. package/types.d.ts +106 -35
  109. package/vanilla.d.ts +46 -2
  110. package/vanilla.js +1260 -1057
  111. package/vanilla.js.map +1 -1
  112. package/vanilla.umd.js +1 -1
  113. package/vanilla.umd.js.map +1 -1
  114. package/icons/aerodrome.12.svg +0 -1
  115. package/icons/bus_stop.12.svg +0 -1
  116. package/icons/elevator.12.svg +0 -1
  117. /package/icons/{helipad.16.svg → helipad.svg} +0 -0
  118. /package/icons/{traffic_light.13.svg → traffic_light.svg} +0 -0
package/openlayers.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import type { Map } from "ol";
2
+ import type { ObjectEvent } from "ol/Object";
3
+ import type { CombinedOnSignature, EventTypes } from "ol/Observable";
2
4
  import type { AnimationOptions, FitOptions } from "ol/View";
3
5
  import { Control } from "ol/control";
4
6
  import type { Options } from "ol/control/Control";
7
+ import type { EventsKey } from "ol/events";
5
8
  import BaseEvent from "ol/events/Event";
6
9
  import type { StyleLike } from "ol/style/Style";
7
10
  import type { FlatStyleLike } from "ol/style/flat";
@@ -11,15 +14,64 @@ type OpenLayersControlOptions = ControlOptions & Options & {
11
14
  flyTo?: boolean | (AnimationOptions & FitOptions);
12
15
  fullGeometryStyle?: StyleLike | FlatStyleLike;
13
16
  };
17
+ type CustomEventMap = {
18
+ select: SelectEvent;
19
+ featureslisted: FeaturesListedEvent;
20
+ featuresmarked: FeaturesMarkedEvent;
21
+ optionsvisibilitychange: OptionsVisibilityChangeEvent;
22
+ pick: PickEvent;
23
+ querychange: QueryChangeEvent;
24
+ response: ResponseEvent;
25
+ reversetoggle: ReverseToggleEvent;
26
+ };
27
+ type CustomObjectOnSignature<ReturnType> = {
28
+ <K extends keyof CustomEventMap>(type: K, listener: (evt: CustomEventMap[K]) => void): ReturnType;
29
+ } & {
30
+ (type: "propertychange", listener: (evt: ObjectEvent) => void): ReturnType;
31
+ } & CombinedOnSignature<EventTypes | "propertychange" | keyof CustomEventMap, ReturnType>;
14
32
  export declare class GeocodingControl extends Control {
15
33
  #private;
34
+ on: CustomObjectOnSignature<EventsKey>;
35
+ once: CustomObjectOnSignature<EventsKey>;
36
+ un: CustomObjectOnSignature<EventsKey>;
16
37
  constructor(options: OpenLayersControlOptions);
17
38
  setMap(map: Map | null): void;
39
+ /**
40
+ * Update the control options.
41
+ *
42
+ * @param options options to update
43
+ */
18
44
  setOptions(options: OpenLayersControlOptions): void;
45
+ /**
46
+ * Set the content of search input box.
47
+ *
48
+ * @param value text to set
49
+ * @param submit perform the search
50
+ */
19
51
  setQuery(value: string, submit?: boolean): void;
52
+ /**
53
+ * Clear geocoding search results from the map.
54
+ */
20
55
  clearMap(): void;
56
+ /**
57
+ * Clear search result list.
58
+ */
21
59
  clearList(): void;
22
- focus(): void;
60
+ /**
61
+ * Set reverse geocoding mode.
62
+ *
63
+ * @param reverseActive reverse geocoding active
64
+ */
65
+ setReverseMode(reverseActive: boolean): void;
66
+ /**
67
+ * Focus the search input box.
68
+ *
69
+ * @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
70
+ */
71
+ focus(options?: FocusOptions): void;
72
+ /**
73
+ * Blur the search input box.
74
+ */
23
75
  blur(): void;
24
76
  }
25
77
  export declare class SelectEvent extends BaseEvent {