HERE iOS SDK Developer's Guide

NMACLE2DataManager

Class Summary

class NMACLE2DataManager

Derived from: NSObject

This class is responsible for managing layer data for CLE2 offline use.

Include: NMAKit.framework/headers/NMACLE2DataManager.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMACLE2DataManager

[For complete information, see the section Class Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(void) cancelAllLayerDownloads

Cancel all ongoing layer downloads that were started with downloadLayer:completionHandler: Completion handlers will return with NMACLE2ErrorCancelled if the request was cancelled

-(NSError *) cancelLayerDownload:(NSString *) layerId

Cancels a specific layer download that is still in progress

-(nullable NSError *) deleteAll

Removes all data from the local storage

-(nullable NSError *) deleteLayer:(NSString *) layerId

Delete one specific layer from the local storage

-(void) downloadLayer:(NSString *) layerId completionHandler:( NMACLE2LayerDownloadCompletionBlock ) completionHandler

Request the full download of one specific layer

-(nullable NSNumber *) numberOfStoredGeometriesOnError:(NSError *_Nullable *_Nullable) error

Retrieves the total number of geometries stored locally

-(NSNumber *) numberOfStoredGeometriesinLayer:(NSString *) layerId onError:(NSError *_Nullable *_Nullable) error

Retrieves the total number of geometries stored locally in a specific layer

Class Method Summary

Table 2. Class Methods
Class Methods

+(nullable instancetype) sharedManager

Returns the NMACLE2DataManager singleton instance

Class Details

This class is responsible for managing layer data for CLE2 offline use.

To download a full layer, call downloadLayer:completionHandler: method. To store a subset of geometries, create a NMACLE2Request and set its cachingEnabled property to true. Multiple layers are supported. To download another layer, simply call the downloadLayer:completionHandler: method with the next layer to be downloaded.

Note:

NMACLE2DataManager is a singleton which must be obtained using the sharedManager method.

Instance Method Details

-(void) cancelAllLayerDownloads

Cancel all ongoing layer downloads that were started with downloadLayer:completionHandler: Completion handlers will return with NMACLE2ErrorCancelled if the request was cancelled.

Note:

An ongoing download might still succeed depending on when cancel is requested, e.g.: if it was already near completion.

-(NSError *) cancelLayerDownload:(NSString *) layerId

Cancels a specific layer download that is still in progress. Outstanding download completion handlers will be called.

Note:

An ongoing download might still succeed depending on when cancel is requested, such as if it was already near completion.

Parameters:

  • layerId

    Name of the layer specifying which download should stop.

Returns:

NSError is nil if the operation succeeded. NMACLE2ErrorInvalidParameter if no download for the layer is in progress.

-(nullable NSError *) deleteAll

Removes all data from the local storage.

Note:

NSError is nil if the operation succeeded.

-(nullable NSError *) deleteLayer:(NSString *) layerId

Delete one specific layer from the local storage.

Note:

NSError is nil if the operation succeeded.

Parameters:

  • layerId

    ID of the layer specifying the layer to download.

-(void) downloadLayer:(NSString *) layerId completionHandler:( NMACLE2LayerDownloadCompletionBlock ) completionHandler

Request the full download of one specific layer.

Note:

NSError is nil if the operation succeeded. It is possible to start simultaneous downloads as long as a different layer id is provided.

Parameters:

  • layerId

    Name of the layer specifying the layer to download.

  • completionHandler

    Specify the block to be executed upon completion.

-(nullable NSNumber *) numberOfStoredGeometriesOnError:(NSError *_Nullable *_Nullable) error

Retrieves the total number of geometries stored locally.

Includes geometries that were cached when a request is made with cacheEnabled plus all geometries downloaded with downloadLayer:completionHandler: method.

Note:

The return value is nil the operation failed; See NMACLE2Request for possible error codes (NMACLE2Error).

Parameters:

  • error

    Reference error object to get the error if any.

-(NSNumber *) numberOfStoredGeometriesinLayer:(NSString *) layerId onError:(NSError *_Nullable *_Nullable) error

Retrieves the total number of geometries stored locally in a specific layer.

Includes geometries that were cached when a request is made with cacheEnabled plus all geometries downloaded with downloadLayer:completionHandler: method.

Note:

The return value is nil the operation failed; See NMACLE2Request for possible error codes (NMACLE2Error).

Parameters:

  • layerId

    The layer id to be queried.

  • error

    Reference error object to get the error if any.

Class Method Details

+(nullable instancetype) sharedManager

Returns the NMACLE2DataManager singleton instance.

This method returns a nil object if access to this operation is denied. Contact your HERE representative for more information.

Note:

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

Returns:

shared NMACLE2DataManager instance.

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.