layout: default title: Locator parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Model

Locator Class

Represents a geocode service resource exposed by the ArcGIS Server REST API. It is used to generate candidates for
an address. It is also used to generate batch results for a set of addresses.
Set the URL to the ArcGIS Server REST resource that represents a Locator service, for example:
https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer.
ArcGIS Maps SDK for JavaScript

public class Locator : dymaptic.GeoBlazor.Core.Model.LogicComponent

Inheritance System.Object 🡒 LogicComponent 🡒 Locator

Constructors

Locator(IJSRuntime, AuthenticationManager) Constructor

Default Constructor

public Locator(Microsoft.JSInterop.IJSRuntime jsRuntime, dymaptic.GeoBlazor.Core.Model.AuthenticationManager authenticationManager);

Parameters

jsRuntime Microsoft.JSInterop.IJSRuntime

Injected JavaScript Runtime reference

authenticationManager AuthenticationManager

Injected Identity Manager reference

Methods

Locator.AddressesToLocations(string, List<Address>, string, List, Nullable, SpatialReference, RequestOptions) Method

Find address candidates for multiple input addresses.
Note: If using as API token: the token must have “Geocode (Stored)” enabled to get results

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.AddressCandidate>> AddressesToLocations(string url, System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.Address> addresses, string? countryCode=null, System.Collections.Generic.List<string>? categories=null, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

url System.String

URL to the ArcGIS Server REST resource that represents a locator service.

addresses System.Collections.Generic.List<Address>

The input addresses in the format supported by the geocode service.

countryCode System.String

Limits the results to only search in the country provided. For example US for United States
or SE for Sweden. Only applies to the World Geocode Service. See the World Geocoding Service documentation for more
information.

categories System.Collections.Generic.List<System.String>

Limit result to one or more categories. For example, “Populated Place” or “Scandinavian Food”.
Only applies to the World Geocode Service. See Category filtering (World Geocoding Service) for more information.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output
geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the
default spatial reference returned by the service if finding locations by address.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<AddressCandidate>>

Locator.AddressesToLocations(List<Address>, string, List, Nullable, SpatialReference, RequestOptions) Method

Find address candidates for multiple input addresses.
Uses the default ESRI geolocation service.
Note: If using as API token: the token must have “Geocode (Stored)” enabled to get results

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.AddressCandidate>> AddressesToLocations(System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.Address> addresses, string? countryCode=null, System.Collections.Generic.List<string>? categories=null, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

addresses System.Collections.Generic.List<Address>

The input addresses in the format supported by the geocode service.

countryCode System.String

Limits the results to only search in the country provided. For example US for United States
or SE for Sweden. Only applies to the World Geocode Service. See the World Geocoding Service documentation for more
information.

categories System.Collections.Generic.List<System.String>

Limit result to one or more categories. For example, “Populated Place” or “Scandinavian Food”.
Only applies to the World Geocode Service. See Category filtering (World Geocoding Service) for more information.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output
geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the
default spatial reference returned by the service if finding locations by address.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<AddressCandidate>>

Locator.AddressToLocations(Address, List, string, Nullable, Point, Nullable, string, Nullable, List, SpatialReference, Extent, RequestOptions) Method

Sends a request to the ArcGIS REST geocode resource to find candidates for a single address specified in the
address parameter.
Uses the default ESRI geolocation service.

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.AddressCandidate>> AddressToLocations(dymaptic.GeoBlazor.Core.Objects.Address address, System.Collections.Generic.List<string>? categories=null, string? countryCode=null, System.Nullable<bool> forStorage=null, dymaptic.GeoBlazor.Core.Components.Geometries.Point? location=null, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, string? magicKey=null, System.Nullable<int> maxLocations=null, System.Collections.Generic.List<string>? outFields=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Components.Geometries.Extent? searchExtent=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

address Address

the various address fields accepted by the corresponding geocode service.

categories System.Collections.Generic.List<System.String>

Limit result to one or more categories. For example, “Populated Place” or “Scandinavian Food”.
Only applies to the World Geocode Service. See Category filtering (World Geocoding Service) for more information.

countryCode System.String

Limit result to a specific country. For example, “US” for United States or “SE” for Sweden.
Only applies to the World Geocode Service. See Geocode coverage (World Geocoding Service) for more information.

forStorage System.Nullable<System.Boolean>

Allows the results of single geocode transactions to be persisted.

location Point

Used to weight returned results for a specified area.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

magicKey System.String

A suggestLocations result ID (magicKey). Used to query for a specific results information.

maxLocations System.Nullable<System.Int32>

Maximum results to return from the query.

outFields System.Collections.Generic.List<System.String>

The list of fields included in the returned result set. This list is a comma delimited list of
field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection
addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you
can specify the intersection candidate fields.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output
geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the
default spatial reference returned by the service if finding locations by address.

searchExtent Extent

Defines the extent within which the geocode server will search. Requires ArcGIS Server
version 10.1 or greater.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<AddressCandidate>>

Locator.AddressToLocations(string, Address, List, string, Nullable, Point, Nullable, string, Nullable, List, SpatialReference, Extent, RequestOptions) Method

Sends a request to the ArcGIS REST geocode resource to find candidates for a single address specified in the
address parameter.

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Objects.AddressCandidate>> AddressToLocations(string url, dymaptic.GeoBlazor.Core.Objects.Address address, System.Collections.Generic.List<string>? categories=null, string? countryCode=null, System.Nullable<bool> forStorage=null, dymaptic.GeoBlazor.Core.Components.Geometries.Point? location=null, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, string? magicKey=null, System.Nullable<int> maxLocations=null, System.Collections.Generic.List<string>? outFields=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Components.Geometries.Extent? searchExtent=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

url System.String

URL to the ArcGIS Server REST resource that represents a locator service.

address Address

the various address fields accepted by the corresponding geocode service.

categories System.Collections.Generic.List<System.String>

Limit result to one or more categories. For example, “Populated Place” or “Scandinavian Food”.
Only applies to the World Geocode Service. See Category filtering (World Geocoding Service) for more information.

countryCode System.String

Limit result to a specific country. For example, “US” for United States or “SE” for Sweden.
Only applies to the World Geocode Service. See Geocode coverage (World Geocoding Service) for more information.

forStorage System.Nullable<System.Boolean>

Allows the results of single geocode transactions to be persisted.

location Point

Used to weight returned results for a specified area.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

magicKey System.String

A suggestLocations result ID (magicKey). Used to query for a specific results information.

maxLocations System.Nullable<System.Int32>

Maximum results to return from the query.

outFields System.Collections.Generic.List<System.String>

The list of fields included in the returned result set. This list is a comma delimited list of
field names. If you specify the shape field in the list of return fields, it is ignored. For non-intersection
addresses you can specify the candidate fields as defined in the geocode service. For intersection addresses you
can specify the intersection candidate fields.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output
geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the
default spatial reference returned by the service if finding locations by address.

searchExtent Extent

Defines the extent within which the geocode server will search. Requires ArcGIS Server
version 10.1 or greater.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<AddressCandidate>>

Locator.LocationToAddress(Point, Nullable, SpatialReference, RequestOptions) Method

Locates an address based on a given point.
Uses the default ESRI geolocation service.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Objects.AddressCandidate> LocationToAddress(dymaptic.GeoBlazor.Core.Components.Geometries.Point location, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

location Point

The point at which to search for the closest address. The location should be in the same spatial
reference as that of the geocode service.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output
geometries are in the spatial reference of the input geometries when performing a reverse geocode and in the
default spatial reference returned by the service if finding locations by address.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<AddressCandidate>

Locator.LocationToAddress(string, Point, Nullable, SpatialReference, RequestOptions) Method

Locates an address based on a given point.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Objects.AddressCandidate> LocationToAddress(string url, dymaptic.GeoBlazor.Core.Components.Geometries.Point location, System.Nullable<dymaptic.GeoBlazor.Core.Model.LocationType> locationType=null, dymaptic.GeoBlazor.Core.Components.Geometries.SpatialReference? outSpatialReference=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

url System.String

URL to the ArcGIS Server REST resource that represents a locator service.

location Point

The point at which to search for the closest address. The location should be in the same spatial
reference as that of the geocode service.

locationType System.Nullable<LocationType>

Define the type of location, either “street” or “rooftop”, of the point returned from the
World Geocoding Service.

outSpatialReference SpatialReference

The spatial reference of the output geometries. If not specified, the output geometries are in the spatial
reference of the input geometries when performing a
reverse geocode and in the default spatial reference returned by the service if finding locations by address.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<AddressCandidate>

Locator.SuggestLocations(Point, string, List, RequestOptions) Method

Get character by character auto complete suggestions.
Uses the default ESRI geolocation service.

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Model.SuggestionResult>> SuggestLocations(dymaptic.GeoBlazor.Core.Components.Geometries.Point location, string text, System.Collections.Generic.List<string>? categories=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

location Point

Defines a normalized location point that is used to sort geocoding candidates based upon their
proximity to the given location.

text System.String

The input text entered by a user which is used by the suggest operation to generate a list of
possible matches.

categories System.Collections.Generic.List<System.String>

A place or address type which can be used to filter suggest results. The parameter supports
input of single category values or multiple comma-separated values.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<SuggestionResult>>

Locator.SuggestLocations(string, Point, string, List, RequestOptions) Method

Get character by character auto complete suggestions.

public System.Threading.Tasks.Task<System.Collections.Generic.List<dymaptic.GeoBlazor.Core.Model.SuggestionResult>> SuggestLocations(string url, dymaptic.GeoBlazor.Core.Components.Geometries.Point location, string text, System.Collections.Generic.List<string>? categories=null, dymaptic.GeoBlazor.Core.Model.RequestOptions? requestOptions=null);

Parameters

url System.String

URL to the ArcGIS Server REST resource that represents a locator service.

location Point

Defines a normalized location point that is used to sort geocoding candidates based upon their
proximity to the given location.

text System.String

The input text entered by a user which is used by the suggest operation to generate a list of
possible matches.

categories System.Collections.Generic.List<System.String>

A place or address type which can be used to filter suggest results. The parameter supports
input of single category values or multiple comma-separated values.

requestOptions RequestOptions

Additional options to be used for the data request

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<SuggestionResult>>