Class Geocoder
Wrapper around the Mapbox Geocoding API. The Geocoder does two things: geocoding and reverse geocoding.
Inheritance
Namespace:Mapbox.Geocoding
Assembly:Mapbox.Geocoding.dll
Syntax
public sealed class Geocoder : object
Constructors
Geocoder(IFileSource)
Initializes a new instance of the Geocoder class.
Declaration
public Geocoder(IFileSource fileSource)
Parameters
Type | Name | Description |
---|---|---|
IFileSource | fileSource | Network access abstraction. |
Methods
Geocode<T>(GeocodeResource<T>, Action<ForwardGeocodeResponse>)
Performs asynchronously a geocoding lookup.
Declaration
public IAsyncRequest Geocode<T>(GeocodeResource<T> geocode, Action<ForwardGeocodeResponse> callback)
Parameters
Type | Name | Description |
---|---|---|
GeocodeResource<T> | geocode | Geocode resource. |
Action<ForwardGeocodeResponse> | callback | Callback to be called after the request is completed. |
Returns
Type | Description |
---|---|
IAsyncRequest | Returns a IAsyncRequest that can be used for canceling a pending request. This handle can be completely ignored if there is no intention of ever canceling the request. |
Type Parameters
Name | Description |
---|---|
T | String or LngLat. Should be automatically inferred. |
Geocode<T>(GeocodeResource<T>, Action<ReverseGeocodeResponse>)
Performs asynchronously a geocoding lookup.
Declaration
public IAsyncRequest Geocode<T>(GeocodeResource<T> geocode, Action<ReverseGeocodeResponse> callback)
Parameters
Type | Name | Description |
---|---|---|
GeocodeResource<T> | geocode | Geocode resource. |
Action<ReverseGeocodeResponse> | callback | Callback to be called after the request is completed. |
Returns
Type | Description |
---|---|
IAsyncRequest | Returns a IAsyncRequest that can be used for canceling a pending request. This handle can be completely ignored if there is no intention of ever canceling the request. |
Type Parameters
Name | Description |
---|---|
T | String or LngLat. Should be automatically inferred. |