locator-store

This bundle provides a store implementation to search within an Esri Geocoding Service. By default, the World Geocoding Service is used.

Usage

No configuration is required. Default values are applied.

The ID of the registered store is esri-locator.

Constraints

The store is implemented for usage within the bundles search-ui and omnisearch. Only the $suggest operator for ComplexQueries is supported.

Configuration reference

The following code sample shows the configurable properties and their default values:

"locator-store": {
    "Config": {
        "title": "Addresses and places",
        "description": "Find addresses or places.",
        "url": "@@locator.service.url@@",
        "countryCode": "",
        "categories": [],
        "prioritizeByLocation": true
    }
}
Property Type Description
title String Title of the store.
description String Description of the store.
url String URL to an Esri Geolocation Service. If empty, the World Geocoding Service is used.
countryCode String Limits the returned suggestions to values in a particular country. For a list of supported country codes, see Geocode coverage.
categories Array of Strings A place or address type to filter suggested results. See suggest documentation.
prioritizeByLocation Boolean true if the search results are to be prioritized according to their distance from the center of the map, otherwise false. Default is true.

Note: If you use a locator view, countryCode and categories properties have no effect, because the view defines this properties internally.

Use Cases

Disable the default store

To disable the default locator store, disable the Config component as in the following code sample:

"locator-store": {
    "Config": {
        "componentEnabled" : false
    }
}

Define multiple custom locator stores

To define further stores with different search constraints, use the following configuration:

"locator-store": {
    "CustomStores": [
        {
            "id": "germany-store",
            "title": "Cities in Germany",
            "countryCode": "DEU",
            "categories": ["City"]
        },
        ...
    ]
}