@types/mapbox__mapbox-gl-geocoder 4.7.6 → 5.0.0
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.
|
@@ -8,7 +8,7 @@ This package contains type definitions for @mapbox/mapbox-gl-geocoder (https://g
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-geocoder.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 23 Feb 2024 22:35:27 GMT
|
|
12
12
|
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/mapbox-gl](https://npmjs.com/package/@types/mapbox-gl)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -50,9 +50,9 @@ declare namespace MapboxGeocoder {
|
|
|
50
50
|
*/
|
|
51
51
|
flyTo?: boolean | mapboxgl.FlyToOptions | mapboxgl.FitBoundsOptions | undefined;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* * @param {Object|'ip'} [options.proximity] a geographical point given as an object with `latitude` and `longitude` properties, or the string 'ip' to use a user's IP address location. Search results closer to this point will be given higher priority.
|
|
54
54
|
*/
|
|
55
|
-
proximity?: LngLatLiteral | undefined;
|
|
55
|
+
proximity?: LngLatLiteral | "ip" | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* If `true`, the geocoder proximity will automatically update based on the map view. (optional, default true)
|
|
58
58
|
*/
|
|
@@ -74,6 +74,10 @@ declare namespace MapboxGeocoder {
|
|
|
74
74
|
* Search results will be limited to the bounding box.
|
|
75
75
|
*/
|
|
76
76
|
bbox?: Bbox | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* If `true`, search input coordinates for reverse geocoding is expected to be in the form `lon, lat` instead of the default `lat, lon`. (optional, default `false`)
|
|
79
|
+
*/
|
|
80
|
+
flipCoordinates?: boolean | undefined;
|
|
77
81
|
/**
|
|
78
82
|
* a comma seperated list of types that filter results to match those specified. See https://www.mapbox.com/developers/api/geocoding/#filter-type for available types.
|
|
79
83
|
*/
|
|
@@ -121,6 +125,14 @@ declare namespace MapboxGeocoder {
|
|
|
121
125
|
* Allow Mapbox to collect anonymous usage statistics from the plugin. (optional, default true)
|
|
122
126
|
*/
|
|
123
127
|
enableEventLogging?: boolean | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* @param [options.enableGeolocation=false] If `true` enable user geolocation feature.
|
|
130
|
+
*/
|
|
131
|
+
enableGeolocation?: boolean | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* @param [options.addressAccuracy="street"] The accuracy for the geolocation feature with which we define the address line to fill. The browser API returns the user's position with accuracy, and sometimes we can get the neighbor's address. To prevent receiving an incorrect address, you can reduce the accuracy of the definition.
|
|
134
|
+
*/
|
|
135
|
+
addressAccuracy?: "address" | "street" | "place" | "country" | undefined;
|
|
124
136
|
/**
|
|
125
137
|
* If `true`, a [Marker](https://docs.mapbox.com/mapbox-gl-js/api/#marker) will be added to the map at the location of the user-selected result using a default set of Marker options.
|
|
126
138
|
* If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map.
|
|
@@ -182,8 +194,17 @@ declare namespace MapboxGeocoder {
|
|
|
182
194
|
}
|
|
183
195
|
declare class MapboxGeocoder implements mapboxgl.IControl {
|
|
184
196
|
constructor(options?: MapboxGeocoder.GeocoderOptions);
|
|
197
|
+
/**
|
|
198
|
+
* The input element created by the geocoder's internal operations.
|
|
199
|
+
*/
|
|
200
|
+
_inputEl?: HTMLInputElement;
|
|
185
201
|
addTo(container: string | HTMLElement | mapboxgl.Map): this;
|
|
186
202
|
onAdd(map: mapboxgl.Map): HTMLElement;
|
|
203
|
+
/**
|
|
204
|
+
* Set the accessToken option used for the geocoding request endpoint.
|
|
205
|
+
* @param {String} accessToken value
|
|
206
|
+
*/
|
|
207
|
+
setAccessToken(accessToken: string): MapboxGeocoder;
|
|
187
208
|
createIcon(name: string, path: any): SVGSVGElement;
|
|
188
209
|
onRemove(): this;
|
|
189
210
|
/**
|
|
@@ -197,13 +218,15 @@ declare class MapboxGeocoder implements mapboxgl.IControl {
|
|
|
197
218
|
query(searchInput: string): this;
|
|
198
219
|
/**
|
|
199
220
|
* Set input
|
|
200
|
-
* searchInput location name or other search input
|
|
221
|
+
* @param {string} searchInput location name or other search input
|
|
222
|
+
* @param {boolean} [showSuggestions=false] display suggestion on setInput call
|
|
201
223
|
*/
|
|
202
|
-
setInput(searchInput: string): this;
|
|
224
|
+
setInput(searchInput: string, showSuggestions?: boolean): this;
|
|
203
225
|
/**
|
|
204
|
-
*
|
|
226
|
+
* @param {Object|'ip'} proximity The new `options.proximity` value. This is a geographical point given as an object with `latitude` and `longitude` properties or the string 'ip'.
|
|
227
|
+
* @param {Boolean} disableTrackProximity If true, sets `trackProximity` to false. True by default to prevent `trackProximity` from unintentionally overriding an explicitly set proximity value.
|
|
205
228
|
*/
|
|
206
|
-
setProximity(proximity: MapboxGeocoder.LngLatLiteral): this;
|
|
229
|
+
setProximity(proximity: MapboxGeocoder.LngLatLiteral | "ip", disableTrackProximity?: boolean): this;
|
|
207
230
|
/**
|
|
208
231
|
* Get the geocoder proximity
|
|
209
232
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/mapbox__mapbox-gl-geocoder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "TypeScript definitions for @mapbox/mapbox-gl-geocoder",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-geocoder",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"@types/geojson": "*",
|
|
29
29
|
"@types/mapbox-gl": "*"
|
|
30
30
|
},
|
|
31
|
-
"typesPublisherContentHash": "
|
|
32
|
-
"typeScriptVersion": "4.
|
|
31
|
+
"typesPublisherContentHash": "21739ab482517596d877e1bc00c0db5b6904eac589b307784d597975fa222eba",
|
|
32
|
+
"typeScriptVersion": "4.6"
|
|
33
33
|
}
|