@maptiler/geocoding-control 2.0.1 → 2.1.0-with-autocomplete-timeout
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/MapLibreBasedGeocodingControl.d.ts +1037 -626
- package/icons/10pin.svg +4 -1
- package/icons/9pin.svg +4 -1
- package/icons/alcohol.svg +1 -1
- package/icons/alpine_hut.svg +1 -1
- package/icons/apartment.svg +4 -1
- package/icons/area.svg +1 -5
- package/icons/artwork.svg +4 -1
- package/icons/beauty.svg +14 -1
- package/icons/bicycle_repair_station.svg +18 -1
- package/icons/biergarten.svg +4 -1
- package/icons/books.svg +14 -1
- package/icons/bowl.svg +4 -1
- package/icons/bowling_alley.svg +4 -1
- package/icons/bus_station.svg +1 -1
- package/icons/camping.svg +1 -1
- package/icons/car_repair.svg +14 -1
- package/icons/car_wash.svg +19 -1
- package/icons/cave_entrance.svg +15 -1
- package/icons/chalet.svg +1 -1
- package/icons/chemist.svg +14 -1
- package/icons/church.svg +4 -1
- package/icons/community_centre.svg +20 -1
- package/icons/firestation.svg +4 -1
- package/icons/guest_house.svg +29 -8
- package/icons/hotel.svg +1 -1
- package/icons/housenumber.svg +19 -14
- package/icons/hut.svg +1 -4
- package/icons/medical_supply.svg +20 -1
- package/icons/memorial.svg +14 -1
- package/icons/motel.svg +19 -1
- package/icons/post.svg +1 -1
- package/icons/post_office.svg +1 -1
- package/icons/postal_code.svg +1 -23
- package/icons/public_bookcase.svg +14 -1
- package/icons/public_building.svg +4 -1
- package/icons/shintoist.svg +1 -1
- package/icons/street.svg +11 -14
- package/icons/vehicle_inspection.svg +18 -1
- package/icons/wilderness_hut.svg +1 -1
- package/leaflet-controller.js +32 -31
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +1 -1
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +32 -1
- package/leaflet.js +1611 -1416
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.js +5 -5
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +1 -1
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +527 -626
- package/maplibregl.js +1968 -1778
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +527 -626
- package/maptilersdk.js +1966 -1776
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers-controller.js +5 -4
- package/openlayers-controller.js.map +1 -1
- package/openlayers-controller.umd.js +1 -1
- package/openlayers-controller.umd.js.map +1 -1
- package/openlayers.d.ts +32 -1
- package/openlayers.js +2082 -1887
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +23 -23
- package/react.d.ts +27 -1
- package/react.js +1320 -1145
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
- package/svelte/FeatureItem.svelte +59 -12
- package/svelte/FeatureItem.svelte.d.ts +2 -2
- package/svelte/GeocodingControl.svelte +182 -85
- package/svelte/GeocodingControl.svelte.d.ts +11 -3
- package/svelte/MapLibreBasedGeocodingControl.d.ts +1037 -626
- package/svelte/MapLibreBasedGeocodingControl.js +36 -6
- package/svelte/leaflet-controller.js +3 -3
- package/svelte/leaflet.d.ts +32 -1
- package/svelte/leaflet.js +35 -2
- package/svelte/maplibregl-controller.js +3 -3
- package/svelte/maplibregl.d.ts +527 -626
- package/svelte/maptilersdk.d.ts +527 -626
- package/svelte/openlayers-controller.js +4 -4
- package/svelte/openlayers.d.ts +32 -1
- package/svelte/openlayers.js +36 -3
- package/svelte/react.d.ts +27 -1
- package/svelte/react.js +16 -4
- package/svelte/types.d.ts +24 -1
- package/svelte/vanilla.d.ts +32 -1
- package/svelte/vanilla.js +35 -2
- package/types.d.ts +24 -1
- package/vanilla.d.ts +32 -1
- package/vanilla.js +1184 -990
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
- package/icons/aerodrome.12.svg +0 -1
- package/icons/bus_stop.12.svg +0 -1
- package/icons/elevator.12.svg +0 -1
- /package/icons/{helipad.16.svg → helipad.svg} +0 -0
- /package/icons/{traffic_light.13.svg → traffic_light.svg} +0 -0
|
@@ -132,26 +132,56 @@ export function crateClasses(Evented, maplibreGl, getExtraProps) {
|
|
|
132
132
|
listens(type) {
|
|
133
133
|
return super.listens(type);
|
|
134
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Update the control options.
|
|
137
|
+
*
|
|
138
|
+
* @param options options to update
|
|
139
|
+
*/
|
|
135
140
|
setOptions(options) {
|
|
136
141
|
Object.assign(this.#options, options);
|
|
137
142
|
const { marker, showResultMarkers, flyTo, fullGeometryStyle, ...restOptions } = this.#options;
|
|
138
143
|
this.#gc?.$set(restOptions);
|
|
139
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Set the content of search input box.
|
|
147
|
+
*
|
|
148
|
+
* @param value text to set
|
|
149
|
+
* @param submit perform the search
|
|
150
|
+
*/
|
|
140
151
|
setQuery(value, submit = true) {
|
|
141
152
|
this.#gc?.setQuery(value, submit);
|
|
142
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Clear geocoding search results from the map.
|
|
156
|
+
*/
|
|
143
157
|
clearMap() {
|
|
144
158
|
this.#gc?.clearMap();
|
|
145
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Clear search result list.
|
|
162
|
+
*/
|
|
146
163
|
clearList() {
|
|
147
164
|
this.#gc?.clearList();
|
|
148
165
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Set reverse geocoding mode.
|
|
168
|
+
*
|
|
169
|
+
* @param reverseActive reverse geocoding active
|
|
170
|
+
*/
|
|
171
|
+
setReverseMode(reverseActive) {
|
|
172
|
+
this.#gc?.$set({ reverseActive });
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Focus the search input box.
|
|
176
|
+
*
|
|
177
|
+
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
178
|
+
*/
|
|
179
|
+
focus(options) {
|
|
180
|
+
this.#gc?.focus(options);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Blur the search input box.
|
|
184
|
+
*/
|
|
155
185
|
blur() {
|
|
156
186
|
this.#gc?.blur();
|
|
157
187
|
}
|
|
@@ -121,7 +121,7 @@ export function createLeafletMapController(map, marker = true, showResultMarkers
|
|
|
121
121
|
}
|
|
122
122
|
markers.length = 0;
|
|
123
123
|
setData();
|
|
124
|
-
if (picked) {
|
|
124
|
+
block: if (picked) {
|
|
125
125
|
let handled = false;
|
|
126
126
|
if (picked.geometry.type === "GeometryCollection") {
|
|
127
127
|
const geoms = picked.geometry.geometries.filter((geometry) => geometry.type === "Polygon" || geometry.type === "MultiPolygon");
|
|
@@ -175,10 +175,10 @@ export function createLeafletMapController(map, marker = true, showResultMarkers
|
|
|
175
175
|
else if (picked.geometry.type === "LineString" ||
|
|
176
176
|
picked.geometry.type === "MultiLineString") {
|
|
177
177
|
setData(picked);
|
|
178
|
-
|
|
178
|
+
break block; // no pin for (multi)linestrings
|
|
179
179
|
}
|
|
180
180
|
if (!showPolygonMarker && picked.geometry.type !== "Point") {
|
|
181
|
-
|
|
181
|
+
break block;
|
|
182
182
|
}
|
|
183
183
|
if (marker instanceof Function) {
|
|
184
184
|
const m = marker(map, picked);
|
package/svelte/leaflet.d.ts
CHANGED
|
@@ -90,11 +90,42 @@ export declare class GeocodingControl extends EventedControl {
|
|
|
90
90
|
#private;
|
|
91
91
|
constructor(options: LeafletControlOptions);
|
|
92
92
|
onAdd(map: L.Map): HTMLDivElement;
|
|
93
|
+
/**
|
|
94
|
+
* Update the control options.
|
|
95
|
+
*
|
|
96
|
+
* @param options options to update
|
|
97
|
+
*/
|
|
93
98
|
setOptions(options: LeafletControlOptions): void;
|
|
99
|
+
/**
|
|
100
|
+
* Set the content of search input box.
|
|
101
|
+
*
|
|
102
|
+
* @param value text to set
|
|
103
|
+
* @param submit perform the search
|
|
104
|
+
*/
|
|
94
105
|
setQuery(value: string, submit?: boolean): void;
|
|
106
|
+
/**
|
|
107
|
+
* Clear geocoding search results from the map.
|
|
108
|
+
*/
|
|
95
109
|
clearMap(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Clear search result list.
|
|
112
|
+
*/
|
|
96
113
|
clearList(): void;
|
|
97
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Set reverse geocoding mode.
|
|
116
|
+
*
|
|
117
|
+
* @param reverseActive reverse geocoding active
|
|
118
|
+
*/
|
|
119
|
+
setReverseMode(reverseActive: boolean): void;
|
|
120
|
+
/**
|
|
121
|
+
* Focus the search input box.
|
|
122
|
+
*
|
|
123
|
+
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
124
|
+
*/
|
|
125
|
+
focus(options?: FocusOptions): void;
|
|
126
|
+
/**
|
|
127
|
+
* Blur the search input box.
|
|
128
|
+
*/
|
|
98
129
|
blur(): void;
|
|
99
130
|
onRemove(): void;
|
|
100
131
|
}
|
package/svelte/leaflet.js
CHANGED
|
@@ -49,23 +49,56 @@ export class GeocodingControl extends EventedControl {
|
|
|
49
49
|
}
|
|
50
50
|
return div;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Update the control options.
|
|
54
|
+
*
|
|
55
|
+
* @param options options to update
|
|
56
|
+
*/
|
|
52
57
|
setOptions(options) {
|
|
53
58
|
Object.assign(this.#options, options);
|
|
54
59
|
const { marker, showResultMarkers, flyTo, fullGeometryStyle, ...restOptions } = this.#options;
|
|
55
60
|
this.#gc?.$set(restOptions);
|
|
56
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Set the content of search input box.
|
|
64
|
+
*
|
|
65
|
+
* @param value text to set
|
|
66
|
+
* @param submit perform the search
|
|
67
|
+
*/
|
|
57
68
|
setQuery(value, submit = true) {
|
|
58
69
|
this.#gc?.setQuery(value, submit);
|
|
59
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Clear geocoding search results from the map.
|
|
73
|
+
*/
|
|
60
74
|
clearMap() {
|
|
61
75
|
this.#gc?.clearMap();
|
|
62
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Clear search result list.
|
|
79
|
+
*/
|
|
63
80
|
clearList() {
|
|
64
81
|
this.#gc?.clearList();
|
|
65
82
|
}
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Set reverse geocoding mode.
|
|
85
|
+
*
|
|
86
|
+
* @param reverseActive reverse geocoding active
|
|
87
|
+
*/
|
|
88
|
+
setReverseMode(reverseActive) {
|
|
89
|
+
this.#gc?.$set({ reverseActive });
|
|
68
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Focus the search input box.
|
|
93
|
+
*
|
|
94
|
+
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
95
|
+
*/
|
|
96
|
+
focus(options) {
|
|
97
|
+
this.#gc?.focus(options);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Blur the search input box.
|
|
101
|
+
*/
|
|
69
102
|
blur() {
|
|
70
103
|
this.#gc?.blur();
|
|
71
104
|
}
|
|
@@ -165,7 +165,7 @@ export function createMapLibreGlMapController(map, maplibregl, marker = true, sh
|
|
|
165
165
|
if (!maplibregl) {
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
if (picked) {
|
|
168
|
+
block: if (picked) {
|
|
169
169
|
let handled = false;
|
|
170
170
|
if (picked.geometry.type === "GeometryCollection") {
|
|
171
171
|
const geoms = picked.geometry.geometries.filter((geometry) => geometry.type === "Polygon" || geometry.type === "MultiPolygon");
|
|
@@ -202,10 +202,10 @@ export function createMapLibreGlMapController(map, maplibregl, marker = true, sh
|
|
|
202
202
|
else if (picked.geometry.type === "LineString" ||
|
|
203
203
|
picked.geometry.type === "MultiLineString") {
|
|
204
204
|
setAndSaveData(picked);
|
|
205
|
-
|
|
205
|
+
break block; // no pin for (multi)linestrings
|
|
206
206
|
}
|
|
207
207
|
if (!showPolygonMarker && picked.geometry.type !== "Point") {
|
|
208
|
-
|
|
208
|
+
break block;
|
|
209
209
|
}
|
|
210
210
|
if (marker instanceof Function) {
|
|
211
211
|
const m = marker(map, picked);
|