@types/mapbox__mapbox-gl-geocoder 4.7.3 → 4.7.5
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.
|
File without changes
|
|
@@ -8,8 +8,8 @@ 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:
|
|
12
|
-
* Dependencies: [@types/
|
|
11
|
+
* Last updated: Wed, 27 Sep 2023 09:42:15 GMT
|
|
12
|
+
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/mapbox-gl](https://npmjs.com/package/@types/mapbox-gl)
|
|
13
13
|
* Global values: `MapboxGeocoder`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
/// <reference types="geojson" />
|
|
8
8
|
|
|
9
|
-
import mapboxgl = require(
|
|
9
|
+
import mapboxgl = require("mapbox-gl");
|
|
10
10
|
|
|
11
11
|
export as namespace MapboxGeocoder;
|
|
12
12
|
export = MapboxGeocoder;
|
|
@@ -112,10 +112,12 @@ declare namespace MapboxGeocoder {
|
|
|
112
112
|
* A function accepting the query string and current features list which performs geocoding to supplement results from the Mapbox Geocoding API.
|
|
113
113
|
* Expected to return a Promise which resolves to an Array of GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
|
|
114
114
|
*/
|
|
115
|
-
externalGeocoder?:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
externalGeocoder?:
|
|
116
|
+
| ((
|
|
117
|
+
searchInput: string,
|
|
118
|
+
features: GeoJSON.FeatureCollection<GeoJSON.Geometry>,
|
|
119
|
+
) => Promise<GeoJSON.FeatureCollection>)
|
|
120
|
+
| undefined;
|
|
119
121
|
/**
|
|
120
122
|
* If `true`, enable reverse geocoding mode. In reverse geocoding, search input is expected to be coordinates in the form `lat, lon`, with suggestions being the reverse geocodes.
|
|
121
123
|
* (optional, default false)
|
|
@@ -147,7 +149,7 @@ declare namespace MapboxGeocoder {
|
|
|
147
149
|
* A string specifying the geocoding [endpoint](https://docs.mapbox.com/api/search/#endpoints) to query.
|
|
148
150
|
* Options are `mapbox.places` and `mapbox.places`. The `mapbox.places-permanent` mode requires an enterprise license for permanent geocodes. (optional, default "mapbox.places")
|
|
149
151
|
*/
|
|
150
|
-
mode?:
|
|
152
|
+
mode?: "mapbox.places" | "mapbox.places-permanent" | undefined;
|
|
151
153
|
/**
|
|
152
154
|
* A function accepting the query string which performs local geocoding to supplement results from the Mapbox Geocoding API.
|
|
153
155
|
* Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
|
|
@@ -158,6 +160,30 @@ declare namespace MapboxGeocoder {
|
|
|
158
160
|
* If `false`, indicates that the `localGeocoder` results should be combined with those from the Mapbox API with the `localGeocoder` results ranked higher. (optional, default false)
|
|
159
161
|
*/
|
|
160
162
|
localGeocoderOnly?: boolean | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Specify whether to return autocomplete results or not. When autocomplete is enabled,
|
|
165
|
+
* results will be included that start with the requested string, rather than just responses
|
|
166
|
+
* that match it exactly. (optional, default true)
|
|
167
|
+
*/
|
|
168
|
+
autocomplete?: boolean | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Specify whether the Geocoding API should attempt approximate, as well as exact, matching
|
|
171
|
+
* when performing searches, or whether it should opt out of this behavior and only attempt
|
|
172
|
+
* exact matching. (optional, default true)
|
|
173
|
+
*/
|
|
174
|
+
fuzzyMatch?: boolean | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Specify whether to request additional metadata about the recommended navigation
|
|
177
|
+
* destination corresponding to the feature or not. Only applicable for address features.
|
|
178
|
+
* (optional, default false)
|
|
179
|
+
*/
|
|
180
|
+
routing?: boolean | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Filter results to geographic features whose characteristics are defined differently by
|
|
183
|
+
* audiences belonging to various regional, cultural, or political groups. (optional,
|
|
184
|
+
* default "us")
|
|
185
|
+
*/
|
|
186
|
+
worldview?: string | undefined;
|
|
161
187
|
}
|
|
162
188
|
}
|
|
163
189
|
declare class MapboxGeocoder implements mapboxgl.IControl {
|
|
@@ -252,6 +278,14 @@ declare class MapboxGeocoder implements mapboxgl.IControl {
|
|
|
252
278
|
setFilter(filter: (feature: MapboxGeocoder.Result) => boolean): this;
|
|
253
279
|
setOrigin(origin: string): this;
|
|
254
280
|
getOrigin(): string;
|
|
281
|
+
setAutocomplete(value: boolean): this;
|
|
282
|
+
getAutocomplete(): boolean;
|
|
283
|
+
setFuzzyMatch(value: boolean): this;
|
|
284
|
+
getFuzzyMatch(): boolean;
|
|
285
|
+
setRouting(value: boolean): this;
|
|
286
|
+
getRouting(): boolean;
|
|
287
|
+
setWorldview(code: string): this;
|
|
288
|
+
getWorldview(): string;
|
|
255
289
|
/**
|
|
256
290
|
* Subscribe to events that happen within the plugin.
|
|
257
291
|
* type name of event. Available events and the data passed into their respective event objects are:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/mapbox__mapbox-gl-geocoder",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.5",
|
|
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": "5b657e2e74e3da607fcbfba63a1feeef7afa9863a586e0f8bdec2ab52f47324f",
|
|
32
|
+
"typeScriptVersion": "4.5"
|
|
33
33
|
}
|