HERE iOS SDK Developer's Guide

NMAGeocoder

Class Summary

class NMAGeocoder

Derived from: NSObject

Represents a factory used to instantiate geocoder requests.

Include: NMAKit.framework/headers/NMAGeocoder.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAGeocoder

[For complete information, see the section Class Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(nonnull NMAGeocodeRequest *) createGeocodeRequestWithQuery:(nullable NSString *) query searchArea:(nullable NMAGeoBoundingBox *) searchArea

Creates a geocoder request that resolves a free text query into an array of NMAPlaceLocation

-(nonnull NMAGeocodeRequest *) createGeocodeRequestWithQuery:(nullable NSString *) query searchRadius:(NSInteger) searchRadius searchCenter:(nullable NMAGeoCoordinates *) searchCenter

Creates a geocoder request that resolves a free text query into an array of NMAPlaceLocation

-(nonnull NMAReverseGeocodeRequest *) createReverseGeocodeRequestWithGeoCoordinates:(nonnull NMAGeoCoordinates *) geoCoordinates

Creates a reverse geocoder request that resolves a NMAGeoCoordinates context into a NMAPlaceLocation

-(nonnull NMAReverseGeocodeRequest *) createReverseGeocodeRequestWithGeoCoordinates:(nonnull NMAGeoCoordinates *) geoCoordinates mode:( NMAReverseGeocodeMode ) geocodeMode bearing:(float) bearing

Creates a reverse geocoder request that resolves a NMAGeoCoordinates context into a NMAPlaceLocation using geocode mode

-(nonnull instancetype) init

Class Method Summary

Table 2. Class Methods
Class Methods

+(nonnull instancetype) new

+(nonnull NMAGeocoder *) sharedGeocoder

Returns the NMAGeocoder singleton instance

Class Details

Represents a factory used to instantiate geocoder requests.

A NMAGeocoder enables searching for location data by way of the following search services:
Note:

NMAGeocoder requires valid authentication credentials to be set via NMAApplicationContext. If valid credentials are not present an attempt to call sharedNMAGeocoder will result in a runtime assert.

Instance Method Details

-(nonnull NMAGeocodeRequest *) createGeocodeRequestWithQuery:(nullable NSString *) query searchArea:(nullable NMAGeoBoundingBox *) searchArea

Creates a geocoder request that resolves a free text query into an array of NMAPlaceLocation. After creating the request, [request startWithListener:(id<NMAResultListener>)] needs to be called to start the search.

Parameters:

  • query

    Query text specifying the search item to locate

  • searchArea

    NMAGeoBoundingBox representing the search area. Note that the search area may be ignored if the query text already specifies a search area, such as a state.

Returns:

The NMAGeocodeRequest

-(nonnull NMAGeocodeRequest *) createGeocodeRequestWithQuery:(nullable NSString *) query searchRadius:(NSInteger) searchRadius searchCenter:(nullable NMAGeoCoordinates *) searchCenter

Creates a geocoder request that resolves a free text query into an array of NMAPlaceLocation. After creating the request, [request startWithListener:(id<NMAResultListener>)] needs to be called to start the search.

Parameters:

  • query

    Query text specifying the search item to locate

  • searchRadius

    Radius in meters, in which the search should be performed

  • searchCenter

    NMAGeoCoordinates object representing the location context used to search for results that are appropriate to the query parameter. Note that this search location can be overridden if the query text already specifies a search area, such as a state.

Returns:

The NMAGeocodeRequest

-(nonnull NMAReverseGeocodeRequest *) createReverseGeocodeRequestWithGeoCoordinates:(nonnull NMAGeoCoordinates *) geoCoordinates

Creates a reverse geocoder request that resolves a NMAGeoCoordinates context into a NMAPlaceLocation. After creating the request, [request startWithListener:(id<NMAResultListener>)] needs to be called to start the search.

Parameters:

Returns:

The NMAReverseGeocodeRequest

-(nonnull NMAReverseGeocodeRequest *) createReverseGeocodeRequestWithGeoCoordinates:(nonnull NMAGeoCoordinates *) geoCoordinates mode:( NMAReverseGeocodeMode ) geocodeMode bearing:(float) bearing

Creates a reverse geocoder request that resolves a NMAGeoCoordinates context into a NMAPlaceLocation using geocode mode. After creating the request, [request startWithListener:(id<NMAResultListener>)] needs to be called to start the search.

Parameters:

  • geoCoordinates

    A query NMAGeoCoordinates context

  • geocodeMode

    Reverse Geocode mode

  • bearing

    Used only in NMAReverseGeocodeModeTrackPosition mode. Expresses the direction in which an asset is heading in degrees starting at true north and continuing clockwise around the compass.

Returns:

The NMAReverseGeocodeRequest

-(nonnull instancetype) init

Instances of this class should not be initialized directly

Class Method Details

+(nonnull instancetype) new

Instances of this class should not be initialized directly

+(nonnull NMAGeocoder *) sharedGeocoder

Returns the NMAGeocoder singleton instance.

Note:

Use this method to obtain a NMAGeocoder instance. Do not call init directly.

Returns:

shared NMAGeocoder instance