diff --git a/docs/introduction.mdx b/docs/introduction.mdx index 8edf7df82..452e1adcf 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -11,7 +11,7 @@ import Map from './components/Map'; `leaflet-geosearch` adds support for geocoding (address lookup, a.k.a. geoseaching) to your (web) application. It comes with controls to be embedded in your Leaflet map. -We support the following providers out-of-the-box; [Algolia](./providers/algolia), [Bing](./providers/bing), [Esri](./providers/esri), [Google](./providers/google), [OpenStreetMap](./providers/openstreetmap), [LocationIQ](./providers/locationiq), [OpenCage](./providers/opencage). +We support the following providers out-of-the-box: [Bing](./providers/bing), [Esri](./providers/esri), [Google](./providers/google), [OpenStreetMap](./providers/openstreetmap), [LocationIQ](./providers/locationiq), [OpenCage](./providers/opencage). Although this project is named `leaflet-geosearch`, this library is also usable without LeafletJS, and does not have any dependencies on Leaflet whatsoever. @@ -85,7 +85,7 @@ map.addControl(search); `leaflet-geosearch` uses so-called "providers" to take care of building the correct service URL and parsing the retrieved data into a uniform format. Thanks to this architecture, it is trivial to add your own providers, so you can use your own geocoding service. -When [`OpenStreetMap`](./providers/openstreetmap) does not match your needs; you can also choose to use the [Algolia](./providers/algolia), [`Bing`](./providers/bing), [`Esri`](./providers/esri), [`Google`](./providers/google), [`LocationIQ`](./providers/locationiq), or [`OpenCage`](./providers/opencage) providers. Most of those providers do however require `API keys`. See the documentation pages on the relevant organisations on how to obtain these keys. +When [`OpenStreetMap`](./providers/openstreetmap) does not match your needs; you can also choose to use the [`Bing`](./providers/bing), [`Esri`](./providers/esri), [`Google`](./providers/google), [`LocationIQ`](./providers/locationiq), or [`OpenCage`](./providers/opencage) providers. Most of those providers do however require `API keys`. See the documentation pages on the relevant organisations on how to obtain these keys. In case you decide to write your own provider, please consider submitting a PR to share your work with us. diff --git a/docs/lib/providers.ts b/docs/lib/providers.ts index cc1a8b25a..d13c6ab14 100644 --- a/docs/lib/providers.ts +++ b/docs/lib/providers.ts @@ -1,5 +1,4 @@ import { - AlgoliaProvider, BingProvider, EsriProvider, GeocodeEarthProvider, @@ -15,8 +14,6 @@ import { } from 'leaflet-geosearch'; export default { - Algolia: new AlgoliaProvider(), - Bing: new BingProvider({ params: { key: process.env.GATSBY_BING_API_KEY }, }), diff --git a/docs/providers/algolia.mdx b/docs/providers/algolia.mdx deleted file mode 100644 index 5c594a2ef..000000000 --- a/docs/providers/algolia.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Algolia -menu: Providers -route: /providers/algolia ---- - -import Playground from '../components/Playground'; -import Map from '../components/Map'; - -# Algolia Provider - -For more options and configurations, see the [Algolia docs][1]. - - - - - -```js -import { AlgoliaProvider } from 'leaflet-geosearch'; - -const provider = new AlgoliaProvider(); - -// add to leaflet -import { GeoSearchControl } from 'leaflet-geosearch'; - -map.addControl( - new GeoSearchControl({ - provider, - style: 'bar', - }), -); -``` - -[1]: https://community.algolia.com/places/api-clients.html#rest-api diff --git a/src/index.ts b/src/index.ts index b0faedab1..3ae242ff8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,6 @@ export { default as GeoSearchControl } from './SearchControl'; export { default as SearchControl } from './SearchControl'; export { default as SearchElement } from './SearchElement'; -export { default as AlgoliaProvider } from './providers/algoliaProvider'; export { default as BingProvider } from './providers/bingProvider'; export { default as EsriProvider } from './providers/esriProvider'; export { default as GeocodeEarthProvider } from './providers/geocodeEarthProvider'; diff --git a/src/providers/__tests__/algoliaProvider.spec.js b/src/providers/__tests__/algoliaProvider.spec.js deleted file mode 100644 index 31a020ae0..000000000 --- a/src/providers/__tests__/algoliaProvider.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -import Provider from '../algoliaProvider'; -import fixtures from './algoliaResponse.json'; - -describe('AlgoliaProvider', () => { - beforeAll(() => { - fetch.mockResponse(async () => ({ body: JSON.stringify(fixtures) })); - }); - - test('Can fetch results', async () => { - const provider = new Provider(); - - const results = await provider.search({ query: 'Madurodam' }); - const result = results[0]; - - expect(result.label).toBeTruthy(); - expect(result.x).toEqual(fixtures.hits[0]._geoloc.lng); - expect(result.y).toEqual(fixtures.hits[0]._geoloc.lat); - expect(result.bounds).toBeValidBounds(); - }); -}); diff --git a/src/providers/__tests__/algoliaResponse.json b/src/providers/__tests__/algoliaResponse.json deleted file mode 100644 index 387ab3b12..000000000 --- a/src/providers/__tests__/algoliaResponse.json +++ /dev/null @@ -1,4797 +0,0 @@ -{ - "hits": [ - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Binnenhof (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0992, - "lng": 4.29661 - }, - "objectID": "131576006_198681996", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Binnenhof (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Domtoren (Madurodam)"] - }, - "_geoloc": { - "lat": 52.099, - "lng": 4.29691 - }, - "objectID": "126767089_198595807", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Domtoren (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Drakensteyn (Madurodam)"] - }, - "_geoloc": { - "lat": 52.099, - "lng": 4.29767 - }, - "objectID": "20764301_2095942001", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Drakensteyn (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Euromast (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0997, - "lng": 4.29783 - }, - "objectID": "21040630_2095942002", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Euromast (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Jordaan (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0991, - "lng": 4.29708 - }, - "objectID": "22516204_2085246204", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Jordaan (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Kinderdijk (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0991, - "lng": 4.29831 - }, - "objectID": "20817720_2085246207", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Kinderdijk (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Maasvlakte (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0999, - "lng": 4.29769 - }, - "objectID": "21245401_2085246209", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Maasvlakte (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Maeslantkering (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0996, - "lng": 4.29816 - }, - "objectID": "20817702_2085246187", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Maeslantkering (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Mauritshuis (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0992, - "lng": 4.29664 - }, - "objectID": "130210890_198681999", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Mauritshuis (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Muiderslot (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0991, - "lng": 4.29776 - }, - "objectID": "21960497_2095942006", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Muiderslot (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Prinsenhof (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0992, - "lng": 4.29673 - }, - "objectID": "21836576_2085246216", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Prinsenhof (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Rijksmuseum (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0991, - "lng": 4.29688 - }, - "objectID": "127027925_199605787", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Rijksmuseum (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Schiphol (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0994, - "lng": 4.29728 - }, - "objectID": "21245410_2085246219", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Schiphol (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Vredespaleis (Madurodam)"] - }, - "_geoloc": { - "lat": 52.099, - "lng": 4.29735 - }, - "objectID": "221662382_2680160", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Vredespaleis (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2584RZ"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Westerkerk (Madurodam)"] - }, - "_geoloc": { - "lat": 52.099, - "lng": 4.29713 - }, - "objectID": "127957736_198682000", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2584RZ", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Westerkerk (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": true, - "importance": 27, - "_tags": [ - "highway", - "highway/footway", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "suburb": ["Den Haag"], - "is_suburb": false, - "locale_names": { - "default": ["Erasmusbrug (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0999, - "lng": 4.29754 - }, - "objectID": "124039062_186854297", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "suburb": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Erasmusbrug (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Beemster Polder (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0994, - "lng": 4.29819 - }, - "objectID": "20678600_2085246181", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Beemster Polder (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Delftse Poort (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0996, - "lng": 4.29635 - }, - "objectID": "20216997_2095942000", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Delftse Poort (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Haven Rotterdam (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0996, - "lng": 4.29769 - }, - "objectID": "21245398_2085246199", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Haven Rotterdam (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - }, - { - "country": { - "de": "Niederlande", - "ru": "Нидерланды", - "pt": "Países Baixos", - "en": "The Netherlands", - "it": "Paesi Bassi", - "fr": "Pays-Bas", - "hu": "Hollandia", - "es": "Países Bajos", - "zh": "荷兰", - "ar": "هولندا", - "default": "Nederland", - "ja": "オランダ", - "pl": "Holandia", - "ro": "Olanda" - }, - "is_country": false, - "city": { - "ar": ["لاهاي"], - "default": ["Den Haag", "'s-Gravenhage"], - "ru": ["Гаага"], - "pt": ["A Haia"], - "en": ["The Hague"], - "it": ["L'Aia"], - "fr": ["La Haye"], - "pl": ["Haga"], - "ro": ["Haga"], - "es": ["La Haya"], - "zh": ["海牙"] - }, - "is_highway": false, - "importance": 30, - "_tags": [ - "tourism", - "tourism/attraction", - "country/nl", - "address", - "source/osm" - ], - "postcode": ["2597LC"], - "population": 525745, - "country_code": "nl", - "is_city": false, - "is_popular": false, - "administrative": ["Zuid-Holland"], - "admin_level": 15, - "is_suburb": false, - "locale_names": { - "default": ["Hoofdkantoor VROM (Madurodam)"] - }, - "_geoloc": { - "lat": 52.0997, - "lng": 4.29639 - }, - "objectID": "22641671_2095942004", - "_highlightResult": { - "country": { - "de": { - "value": "Niederlande", - "matchLevel": "none", - "matchedWords": [] - }, - "ru": { - "value": "Нидерланды", - "matchLevel": "none", - "matchedWords": [] - }, - "pt": { - "value": "Países Baixos", - "matchLevel": "none", - "matchedWords": [] - }, - "en": { - "value": "The Netherlands", - "matchLevel": "none", - "matchedWords": [] - }, - "it": { - "value": "Paesi Bassi", - "matchLevel": "none", - "matchedWords": [] - }, - "fr": { - "value": "Pays-Bas", - "matchLevel": "none", - "matchedWords": [] - }, - "hu": { - "value": "Hollandia", - "matchLevel": "none", - "matchedWords": [] - }, - "es": { - "value": "Países Bajos", - "matchLevel": "none", - "matchedWords": [] - }, - "zh": { - "value": "荷兰", - "matchLevel": "none", - "matchedWords": [] - }, - "ar": { - "value": "هولندا", - "matchLevel": "none", - "matchedWords": [] - }, - "default": { - "value": "Nederland", - "matchLevel": "none", - "matchedWords": [] - }, - "ja": { - "value": "オランダ", - "matchLevel": "none", - "matchedWords": [] - }, - "pl": { - "value": "Holandia", - "matchLevel": "none", - "matchedWords": [] - }, - "ro": { - "value": "Olanda", - "matchLevel": "none", - "matchedWords": [] - } - }, - "city": { - "ar": [ - { - "value": "لاهاي", - "matchLevel": "none", - "matchedWords": [] - } - ], - "default": [ - { - "value": "Den Haag", - "matchLevel": "none", - "matchedWords": [] - }, - { - "value": "'s-Gravenhage", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ru": [ - { - "value": "Гаага", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pt": [ - { - "value": "A Haia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "en": [ - { - "value": "The Hague", - "matchLevel": "none", - "matchedWords": [] - } - ], - "it": [ - { - "value": "L'Aia", - "matchLevel": "none", - "matchedWords": [] - } - ], - "fr": [ - { - "value": "La Haye", - "matchLevel": "none", - "matchedWords": [] - } - ], - "pl": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "ro": [ - { - "value": "Haga", - "matchLevel": "none", - "matchedWords": [] - } - ], - "es": [ - { - "value": "La Haya", - "matchLevel": "none", - "matchedWords": [] - } - ], - "zh": [ - { - "value": "海牙", - "matchLevel": "none", - "matchedWords": [] - } - ] - }, - "postcode": [ - { - "value": "2597LC", - "matchLevel": "none", - "matchedWords": [] - } - ], - "administrative": [ - { - "value": "Zuid-Holland", - "matchLevel": "none", - "matchedWords": [] - } - ], - "locale_names": { - "default": [ - { - "value": "Hoofdkantoor VROM (Madurodam)", - "matchLevel": "full", - "fullyHighlighted": false, - "matchedWords": ["madurodam"] - } - ] - } - } - } - ], - "nbHits": 20, - "processingTimeMS": 23, - "query": "Madurodam", - "params": "query=Madurodam", - "degradedQuery": false -} diff --git a/src/providers/algoliaProvider.ts b/src/providers/algoliaProvider.ts deleted file mode 100644 index 262f918f2..000000000 --- a/src/providers/algoliaProvider.ts +++ /dev/null @@ -1,136 +0,0 @@ -import AbstractProvider, { - LatLng, - ParseArgument, - SearchArgument, - SearchResult, -} from './provider'; - -export interface RequestResult { - hits: RawResult[]; -} - -interface ValueMatch { - value: string; - matchLevel: string; - matchedWords: string[]; - fullyHighlighted?: boolean; -} - -export interface RawResult { - country: { [key: string]: string }; - country_code: string; - city: { [key: string]: string[] }; - importance: number; - _tags: string[]; - postcode: string[]; - population: number; - is_country: boolean; - is_highway: boolean; - is_city: boolean; - is_popular: boolean; - administrative: string[]; - admin_level: number; - is_suburb: boolean; - locale_names: { - default: string[]; - }; - _geoloc: LatLng; - objectID: string; - _highlightResult: { - country: { - default: ValueMatch; - [key: string]: ValueMatch; - }; - city: { - default: ValueMatch[]; - [key: string]: ValueMatch[]; - }; - postcode: ValueMatch[]; - administrative: ValueMatch[]; - locale_names: { - default: ValueMatch[]; - }; - }; -} - -interface ProviderOptions { - key?: string; - [key: string]: string | boolean | number | undefined; -} - -export default class Provider extends AbstractProvider< - RequestResult, - RawResult -> { - endpoint(): string { - // No query, Algolia requires POST request - return 'https://places-dsn.algolia.net/1/places/query'; - } - - /** - * Find index of value with best match - * (full, fallback to partial, and then to 0) - */ - findBestMatchLevelIndex(vms: ValueMatch[]): number { - const match = - vms.find((vm) => vm.matchLevel === 'full') || - vms.find((vm) => vm.matchLevel === 'partial'); - return match ? vms.indexOf(match) : 0; - } - - /** - * Algolia not provides labels for hits, so - * we will implement that builder ourselves - */ - getLabel(result: RawResult): string { - return [ - // Building + Street - result.locale_names?.default[ - this.findBestMatchLevelIndex( - result._highlightResult.locale_names.default, - ) - ], - // City - result.city?.default[ - this.findBestMatchLevelIndex(result._highlightResult.city.default) - ], - // Administrative (State / Province) - result.administrative[ - this.findBestMatchLevelIndex(result._highlightResult.administrative) - ], - // Zip code / Postal code - result.postcode?.[ - this.findBestMatchLevelIndex(result._highlightResult.postcode) - ], - // Country - result.country?.default, - ] - .filter(Boolean) - .join(', '); - } - - parse(response: ParseArgument): SearchResult[] { - return response.data.hits.map((r) => ({ - x: r._geoloc.lng, - y: r._geoloc.lat, - label: this.getLabel(r), - bounds: null, // Algolia API does not provide bounds - raw: r, - })); - } - - async search({ query }: SearchArgument): Promise[]> { - const params = typeof query === 'string' ? { query } : query; - - const request = await fetch(this.endpoint(), { - method: 'POST', - body: JSON.stringify({ - ...this.options.params, - ...params, - }), - }); - - const json = await request.json(); - return this.parse({ data: json }); - } -} diff --git a/src/providers/index.ts b/src/providers/index.ts index bc4548678..56b5b5cd3 100644 --- a/src/providers/index.ts +++ b/src/providers/index.ts @@ -1,4 +1,3 @@ -export { default as AlgoliaProvider } from './algoliaProvider'; export { default as BingProvider } from './bingProvider'; export { default as EsriProvider } from './esriProvider'; export { default as GeocodeEarthProvider } from './geocodeEarthProvider';