HERE iOS SDK Developer's Guide

NMAVenue3dService

Class Summary

class NMAVenue3dService

Derived from: NSObject

NMAVenue3dService offers methods to search for venues and to get NMAVenue3dVenue objects based on search.

Include: NMAKit.framework/headers/NMAVenue3dService.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAVenue3dService

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, assign] NMAVenue3dAccount activeVenueAccount

Returns the active NMAVenue3dAccount, if any exists, or nil otherwise

[readable, writable, assign] BOOL  combinedContent

A value indicating whether the HERE SDK and the HERE private 3D venue content will be used together

[readable, writable, assign] BOOL  devEnv

Defines whether a development or another backend is used

[readable, assign] NMAVenue3dServiceInitializationStatus   initializationStatus

The venue service initialization status

[readable, writable, assign] BOOL  privateContent

A value indicating whether the HERE SDK or the HERE private 3D venue content is to be used

[readable, writable, assign] BOOL  testEnv

Defines whether a normal or a test backend is used

[readable, assign] NSArray< NMAVenue3dAccount * > *  venueAccounts

Returns a (possibly empty) array of available NMAVenue3dAccount objects

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(void) addListener:(nonnull id< NMAVenue3dServiceListener >) listener

Add a listener to the venue service

-(void) authenticateWithCallback:(nullable id< NMAVenue3dAuthenticationListener >) listener

Starts NMAVenue3dService authentication asynchronously, without starting NMAVenue3dService

-(void) getVenueWithInfo:(nonnull NMAVenue3dVenueInfo *) venueInfo

Asynchronously gets the NMAVenue3dVenue object that is specified by the given NMAVenue3dVenueInfo object

-(void) getVenuesWithInfoArray:(nonnull NSArray< NMAVenue3dVenueInfo * > *) venueInfoArray

Asynchronously gets the NMAVenue3dVenue objects that are specified by the given list of NMAVenue3dVenueInfo objects

-(nonnull) init

-(nullable) initAdditionalVenueService

Returns a new additional NMAVenue3dService instance.

-(void) removeListener:(nonnull id< NMAVenue3dServiceListener >) listener

Remove a listener from the venue service

-(BOOL) setActiveVenueAccount:(nullable NMAVenue3dAccount *) account

Sets an active NMAVenue3dAccount object

-(void) setHereAccountToken:(nonnull NSString *) token

Sets a HERE account token

-(void) start

Starts NMAVenue3dService asynchronously

-(void) stopWithCallback:(nullable id< NMAVenue3dServiceStopListener >) stopListener

Stops NMAVenue3dService asynchronously

-(nullable NMAVenue3dVenueInfo *) venueAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Searches for a venue closest to the given NMAGeoCoordinates

-(nullable NMAVenue3dVenueInfo *) venueAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates radius:(float) radius

Searches for a venue closest to the given NMAGeoCoordinates within a radius

-(nullable NMAVenue3dVenueInfo *) venueWithId:(nonnull NSString *) venueId

Gets venue info object for the venue identifier

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Searches for venues at the given NMAGeoCoordinates

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates radius:(float) radius

Searches for venues near the given NMAGeoCoordinates

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesInGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Searches for venues inside the given NMAGeoBoundingBox

Class Method Summary

Table 3. Class Methods
Class Methods

+(nonnull) new

+(nullable) sharedVenueService

Returns the singleton NMAVenue3dService instance.

+(void) stopAndClearCacheWithCallback:(nullable id< NMAVenue3dServiceClearCacheListener >) listener

Clears cached data including all downloaded venues

Class Details

NMAVenue3dService offers methods to search for venues and to get NMAVenue3dVenue objects based on search.

Use of this object does not necessitate NMAMapView involvement.

This class can not be instantiated directly. Use the NMAVenue3dService::sharedVenueService method to get the singeton instance of the class instead.

Public Property Details

[readable, assign] NMAVenue3dAccountactiveVenueAccount

Returns the active NMAVenue3dAccount, if any exists, or nil otherwise. A NMAVenue3dAccount object only exists if the user is authenticated with a HERE account token and if the account is connected to at least one private content sources. If an account has been made active by calling the setter of this property, that account is returned. Otherwise, the first account in the list of accounts is returned. NMAVenue3dService will use this account only if private content is active.

See also:

setHereAccountToken:

authenticateWithCallback:

venueAccounts

setActiveVenueAccount:

[readable, writable, assign] BOOL combinedContent

A value indicating whether the HERE SDK and the HERE private 3D venue content will be used together. By default combined content is not used.

If NMAVenue3dService is using private content, then data from the private content will be used as primary source, and HERE SDK data as an alternative one. Otherwise the HERE SDK content will be primary source of data and the private content will be an alternative one. This property needs to be set before NMAVenue3DService::start. If NMAVenue3dService is already running, stop it first using NMAVenue3dService::stopAndClearCacheWithCallback: or NMAVenue3dService::stopWithCallback:, and then after calling this function, start it again using NMAVenue3dService::start.

[readable, writable, assign] BOOL devEnv

Defines whether a development or another backend is used. By default, the backend specified with the testEnv property is used.

This property needs to be set before NMAVenue3dService::start. If NMAVenue3dService is already running, stop it first using NMAVenue3dService::stopAndClearCacheWithCallback: or NMAVenue3dService::stopWithCallback:, and then after calling this function, start it again using NMAVenue3dService::start.

[readable, assign] NMAVenue3dServiceInitializationStatus  initializationStatus

The venue service initialization status.

[readable, writable, assign] BOOL privateContent

A value indicating whether the HERE SDK or the HERE private 3D venue content is to be used. The HERE SDK content is used by default.

This property needs to be set before NMAVenue3dService::start. If NMAVenue3dService is already running, stop it first using NMAVenue3dService::stopAndClearCacheWithCallback: or NMAVenue3dService::stopWithCallback:, and then after calling this function, start it again using NMAVenue3dService::start.

[readable, writable, assign] BOOL testEnv

Defines whether a normal or a test backend is used. The normal backend is used by default. This property is irrelevant when the property devEnv is true, because then the development backend is used.

This property needs to be set before NMAVenue3dService::start. If NMAVenue3dService is already running, stop it first using NMAVenue3dService::stopAndClearCacheWithCallback: or NMAVenue3dService::stopWithCallback:, and then after calling this function, start it again using NMAVenue3dService::start.

[readable, assign] NSArray< NMAVenue3dAccount * > * venueAccounts

Returns a (possibly empty) array of available NMAVenue3dAccount objects. Multiple NMAVenue3dAccount objects can be returned if the user is authenticated with the HERE account token and if this HERE account token is connected to at least one private content sources.

See also:

setHereAccountToken:

authenticateWithCallback:

activeVenueAccount

setActiveVenueAccount:

Instance Method Details

-(void) addListener:(nonnull id< NMAVenue3dServiceListener >) listener

Add a listener to the venue service. The listener must implement the NMAVenue3dServiceListener protocol. The listener monitors the venue service initialization status and a venue loaded completion event.

Parameters:

See also:

NMAVenue3dServiceListener

-(void) authenticateWithCallback:(nullable id< NMAVenue3dAuthenticationListener >) listener

Starts NMAVenue3dService authentication asynchronously, without starting NMAVenue3dService. Can be used to retrieve information about NMAVenue3dAccount objects assosiated with the active HERE account token.

An authentication status is returned to the object registered as NMAVenue3dAuthenticationListener.

Parameters:

See also:

setHereAccountToken:

activeVenueAccount

venueAccounts

setActiveVenueAccount:

-(void) getVenueWithInfo:(nonnull NMAVenue3dVenueInfo *) venueInfo

Asynchronously gets the NMAVenue3dVenue object that is specified by the given NMAVenue3dVenueInfo object.

Venue service listeners will be notified when the venue is loaded via the NMAVenue3dServiceListener::didGetVenue method.

Parameters:

  • venueInfo

    The NMAVenue3dVenueInfo object specifying the venue to get.

See also:

NMAVenue3dVenueInfo:

-(void) getVenuesWithInfoArray:(nonnull NSArray< NMAVenue3dVenueInfo * > *) venueInfoArray

Asynchronously gets the NMAVenue3dVenue objects that are specified by the given list of NMAVenue3dVenueInfo objects.

Venue service listeners will be notified when a venue is loaded via the NMAVenue3dServiceListener::didGetVenue method.

Parameters:

See also:

NMAVenue3dVenueInfo:

-(nonnull) init

Instances of this class should not be initialized directly

-(nullable) initAdditionalVenueService

Returns a new additional NMAVenue3dService instance.

Note:

Use this method to obtain a new additional NMAVenue3dService instance.

Note:

The returned object isn't related to the shared singleton NMAVenue3dService instance.

-(void) removeListener:(nonnull id< NMAVenue3dServiceListener >) listener

Remove a listener from the venue service. The listener must implement the NMAVenue3dServiceListener protocol. The listener monitors the venue service initialization status and a venue loaded completion event.

Parameters:

-(BOOL) setActiveVenueAccount:(nullable NMAVenue3dAccount *) account

Sets an active NMAVenue3dAccount object. In case of success, the user can restart the current NMAVenue3dService object with the NMAVenue3dService::start method to switch to another private content source, related to the new active NMAVenue3dAccount object.

Parameters:

Returns:

YES if NMAVenue3dAccount was set successfully, NO otherwise.

See also:

setHereAccountToken:

authenticateWithCallback:

activeVenueAccount

venueAccounts

-(void) setHereAccountToken:(nonnull NSString *) token

Sets a HERE account token. In case of valid token and if private content is used, NMAVenue3dService will be using private bucket of a HERE account instead of private bucket of the app.

Parameters:

  • token

    a HERE account token.

-(void) start

Starts NMAVenue3dService asynchronously. The method will do nothing if NMAVenue3dService is already initialized with status NMAVenue3dServiceInitializationStatusOnlineSuccess.

An initialization status is returned to objects registered as NMAVenue3dServiceListener to NMAVenue3dService.

-(void) stopWithCallback:(nullable id< NMAVenue3dServiceStopListener >) stopListener

Stops NMAVenue3dService asynchronously. NMAVenue3dServiceStopListener::didStopVenueService: callback will be called and this callback also indicates that no more Venue loading is happening anymore. Use NMAVenue3dService::start to start the service again.

Parameters:

  • stopListener

    Notification callback.

-(nullable NMAVenue3dVenueInfo *) venueAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Searches for a venue closest to the given NMAGeoCoordinates.

Parameters:

  • coordinates

    The location around which to search for venues.

Returns:

The closet NMAVenue3dVenueInfo object to the specified point or nil if there is no any.

See also:

NMAVenue3dVenueInfo

-(nullable NMAVenue3dVenueInfo *) venueAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates radius:(float) radius

Searches for a venue closest to the given NMAGeoCoordinates within a radius.

Parameters:

  • coordinates

    The location around which to search for venues.

  • radius

    The radius in meters where to search venues.

Returns:

The closet NMAVenue3dVenueInfo object to the specified point or nil if there is no any

See also:

NMAVenue3dVenueInfo

-(nullable NMAVenue3dVenueInfo *) venueWithId:(nonnull NSString *) venueId

Gets venue info object for the venue identifier.

Parameters:

  • venueId

    venue id

Returns:

Venue info object for the venue identifier

See also:

getVenueWithInfo:

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates

Searches for venues at the given NMAGeoCoordinates.

Parameters:

  • coordinates

    The location around which to search for venues.

Returns:

An array of NMAVenue3dVenueInfo objects representing the venues found near the specified location.

See also:

NMAVenue3dVenueInfo

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesAtGeoCoordinates:(nonnull NMAGeoCoordinates *) coordinates radius:(float) radius

Searches for venues near the given NMAGeoCoordinates.

Parameters:

  • coordinates

    The location around which to search for venues.

  • radius

    The radius in meters where to search venues.

Returns:

The array of NMAVenue3dVenueInfo objects found near the specified point

See also:

NMAVenue3dVenueInfo

-(nullable NSArray< NMAVenue3dVenueInfo * > *) venuesInGeoBoundingBox:(nonnull NMAGeoBoundingBox *) boundingBox

Searches for venues inside the given NMAGeoBoundingBox.

Parameters:

  • boundingBox

    The area in which to search for venues.

Returns:

An array of NMAVenue3dVenueInfo objects representing the venues found inside the specified area.

See also:

NMAVenue3dVenueInfo

Class Method Details

+(nonnull) new

Instances of this class should not be initialized directly

+(nullable) sharedVenueService

Returns the singleton NMAVenue3dService instance.

Note:

Use this method to obtain a shared singleton NMAVenue3dService instance.

+(void) stopAndClearCacheWithCallback:(nullable id< NMAVenue3dServiceClearCacheListener >) listener

Clears cached data including all downloaded venues. All running instances of venue service will be stopped asynchronously and locked ( initializationStatus will return NMAVenue3dServiceInitializationStatusLocked during the operation). After the cache is cleared, NMAVenue3dService needs to be started again using the NMAVenue3dService::start method.

Parameters:

  • listener

    Notification callback.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.