HERE iOS SDK Developer's Guide

NMAMapTileRequest

Class Summary

class NMAMapTileRequest

Derived from: NSObject

Represents a request for tile bitmap data.

Include: NMAKit.framework/headers/NMAMapTileRequest.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMapTileRequest

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, assign] int  bytesLength

The length of the tile bitmap data buffer in bytes

[readable, assign] void *  bytesPtr

Returns a memory buffer for you to copy bitmap data into.

[readable, writable, assign] NMAMapTileRequestStatus   status

NMAMapTileRequest status.

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) getBytesFromData:(NSData *_Nonnull) tileData

Copies tile bitmap data from an NSData instance to the bytesPtr property.

Class Details

Represents a request for tile bitmap data.

NMAMapTileRequest encapsulates a memory buffer for the bitmap data and a request status. It is important that you write exactly bytesLength bytes into the bytesPtr and only set status after the write is complete.

Public Property Details

[readable, assign] int bytesLength

The length of the tile bitmap data buffer in bytes.

[readable, assign] void * bytesPtr

Returns a memory buffer for you to copy bitmap data into.

If you are going to copy data to bytesPtr directly via memcpy or other low level functions make sure you copy exactly bytesLength number of bytes.

nil will be returned if memory cannot be allocated to hold the bitmap data.

[readable, writable, assign] NMAMapTileRequestStatus  status

NMAMapTileRequest status.

This must be set to NMAMapTileRequestStatusFailed or NMAMapTileRequestStatusComplete when you deem the request complete.

status may only be set NMAMapTileRequestStatusFailed or NMAMapTileRequestStatusComplete precisely once and attempts to set the status to other values will be ignored.

If the request is set to NMAMapTileRequestStatusComplete the framework will begin reading the bitmap data stored in bytesPtr immedidately so only set to NMAMapTileRequestStatusComplete after you have finished writing the bitmap data.

If the request is set to NMAMapTileRequestStatusFailed the framework will repeatedly ask for tile data again via NMAMapTileLayerDataSource::mapTileLayer:requestDataForTileAtX: until the request is completed with NMAMapTileRequestStatusComplete. If the tile data cannot be made available then return NO from NMAMapTileLayerDataSource::mapTileLayer:hasTileAtX: to avoid endless callbacks.

Instance Method Details

-(BOOL) getBytesFromData:(NSData *_Nonnull) tileData

Copies tile bitmap data from an NSData instance to the bytesPtr property.

This is equivalent to writing to bytesPtr directly.

Parameters:

  • tileData

    NSData instance containing tile bitmap data. Ensure the length of tileData matches bytesLength.

Returns:

YES if the data was copied. NO if tileData is the wrong length or if memory allocation fails.

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.