HERE iOS SDK Developer's Guide

<NMAMapTileLayerDataSource>

Protocol Summary

protocol <NMAMapTileLayerDataSource>

Derived from: <NSObject>

An interface for providing tile bitmap data to an NMAMapTileLayer instance.

Include: NMAKit.framework/headers/NMAMapTileLayer.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for <NMAMapTileLayerDataSource> – <NMAMapTileLayerDataSource>

[For complete information, see the section Protocol Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

- @optional (BOOL) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer hasTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Indicates if the specified tile should be rendered.

- @optional (nonnull NSData *) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer requestDataForTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Requests raw tile bitmap data for the specified tile.

- @optional (nonnull NSString *) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer urlForTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Returns a URL from which the tile bitmap can be downloaded.

Protocol Details

An interface for providing tile bitmap data to an NMAMapTileLayer instance.

Note:

The methods of this protocol will be called on an internal NMA map rendering queue. Blocking this queue for extended periods of time will adversely effect map rendering performance.

Instance Method Details

- @optional (BOOL) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer hasTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Indicates if the specified tile should be rendered.

If this method returns NO then a further call to request tile bitmap data or tile URL will not be made. Not implementing this protocol method is equivalent to returning YES.

At each zoomLevel the framework expects the "world" to be rendered on (2^zoomLevel)^2 tiles.

The x and y parameters indicate which tile is being requested for the given zoom level:
  • At zoom level 3 the framework will ask you for 8 x 8 tiles
  • At zoom level 4 the framework will ask you for 16 x 16 tiles
  • ...
Note:

This method is called on an internal NMA map rendering queue. Blocking for extended periods of time will impact map rendering performance.

Parameters:

  • mapTileLayer

    NMAMapTileLayer instance that is requesting the tile.

  • x

    X coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • y

    Y coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • zoomLevel

    Zoom level of the tile being requested in the range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel. The zoomLevel parameter value may NOT have the same value as the zoomLevel property of the NMAMapView to which the NMAMapTileLayer has been added.

Returns:

YES if the requested tile should be rendered, NO otherwise.

- @optional (nonnull NSData *) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer requestDataForTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Requests raw tile bitmap data for the specified tile.

Implement this method if you wish to supply raw tile bitmap data. This method will be called whenever the map view needs bitmap data to render the specified tile.

See mapTileLayer:hasTileAtX:y:zoomLevel: for a detailed description of the x, y and zoomLevel parameters.

Implementing this method will prevent mapTileLayer:urlForTileAtX:y:zoomLevel: and mapTileLayer:requestTileAtX:y:zoomLevel:tileRequest from being called.

Note:

This method is called on an internal NMA map rendering queue. Blocking for extended periods of time will impact map rendering performance.

Parameters:

  • mapTileLayer

    NMAMapTileLayer instance that is requesting the tile bitmap.

  • x

    X coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • y

    Y coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • zoomLevel

    Zoom level of the tile being requested in the range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel. The zoomLevel parameter value may NOT have the same value as the zoomLevel property of the NMAMapView to which the NMAMapTileLayer has been added.

Returns:

Raw tile bitmap data.

- @optional (nonnull NSString *) mapTileLayer:(nonnull NMAMapTileLayer *) mapTileLayer urlForTileAtX:(NSUInteger) x y:(NSUInteger) y zoomLevel:(NSUInteger) zoomLevel

Returns a URL from which the tile bitmap can be downloaded.

Implement this method if you wish to have the framework download tile bitmap data from a URL you provide. This method will be called whenever the map view needs bitmap data to render the specified tile.

This method is provided as a convenience for the common case of downloading bitmaps tiles from a URL. The data returned from the URL must be in either png and jpg format.

See mapTileLayer:hasTileAtX:y:zoomLevel: for a detailed description of the x, y and zoomLevel parameters.

Note:

This method will not be called if you also implement mapTileLayer:requestTileAtX:y:zoomLevel:tileRequest or mapTileLayer:requestTileAtX:y:zoomLevel

Note:

This method is called on an internal NMA map rendering queue. Blocking for extended periods of time will impact map rendering performance.

Parameters:

  • mapTileLayer

    NMAMapTileLayer instance that is requesting the tile URL.

  • x

    X coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • y

    Y coordinate of the tile being requested in the range 1..(2^zoomLevel).

  • zoomLevel

    Zoom level of the tile being requested in the range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel. The zoomLevel parameter value may NOT have the same value as the zoomLevel property of the NMAMapView to which the NMAMapTileLayer has been added.

Returns:

URL to fetch the requested tile from.

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.