HERE iOS SDK Developer's Guide

NMAMapObject

Class Summary

class NMAMapObject

Derived from: NSObject

 

Include: NMAKit.framework/headers/NMAMapObject.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMapObject

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, weak] NMAMapContainer parent

The map object's container

[readable, assign] NMAMapObjectType   type

The map object's type

[readable, writable, assign] BOOL  visible

Indicates whether the visibility of the NMAMapObject on the map is enabled

[readable, writable, assign] NSUInteger  zIndex

The NSUInteger z-index (stacking order) for the NMAMapObject within its containing NMAMapContainer, or within the NMAMapView if the object was added to NMAMapView directly.

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) isVisibleAtZoomLevel:(float) zoomLevel

Determines whether the map object is set to visible at the specified zoom level when the map object's visible property is set to YES

-(void) setVisibility:(BOOL) visible atZoomLevel:(float) zoomLevel

Sets the visibility of the map object at a specific zoom level.

-(void) setVisibility:(BOOL) visible fromZoomLevel:(float) fromZoomLevel toZoomLevel:(float) toZoomLevel

Sets the visibility of the map object for a range of zoom levels.

-(NSUInteger) uniqueId

Returns the unique ID value of the NMAMapObject

Class Details

 

Public Property Details

[readable, weak] NMAMapContainerparent

The map object's container. This will be nil if the map object does not belong to a container or was added to an NMAMapView directly.

[readable, assign] NMAMapObjectType  type

The map object's type.

[readable, writable, assign] BOOL visible

Indicates whether the visibility of the NMAMapObject on the map is enabled. Whether the NMAMapObject is actually visible depends on whether the visible mask is set for the desired zoom level.

Note:

The getter is isVisible.

Note:

This property is independent but takes priority over the per-zoom level settings. For example, you can call [setVisible:YES fromZoomLevel:0 toZoomLevel:6] and then set visible to NO, and the object will not appear on the map. Setting visible to YES will then cause the object to be visible in zoom levels 0 to 6.

[readable, writable, assign] NSUInteger zIndex

The NSUInteger z-index (stacking order) for the NMAMapObject within its containing NMAMapContainer, or within the NMAMapView if the object was added to NMAMapView directly.

Must be in the range NMAMapObjectMinimumZIndex..NMAMapObjectMaximumZIndex. The property will be clamped to this range if invalid values are specified.

Note:

Objects with the highest value are placed at the top of the stacking order.

Instance Method Details

-(BOOL) isVisibleAtZoomLevel:(float) zoomLevel

Determines whether the map object is set to visible at the specified zoom level when the map object's visible property is set to YES.

Parameters:

  • zoomLevel

    for checking whether the map object is visible. Will be clamped to the range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel. This is rounded off to the nearest integer. e.g. 14.1 means [14..15)

-(void) setVisibility:(BOOL) visible atZoomLevel:(float) zoomLevel

Sets the visibility of the map object at a specific zoom level.

This method can only be used after the NMAMapObject has been added to the map. By default, the visibility for all zoom levels are set to YES.

Note:

This will take effect if/when the map object's visibile property is set YES.

Parameters:

  • visible

    indicates whether the map object should be visible.

  • zoomLevel

    for applying the specified visibility. Will be clamped to the range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel. This is rounded off to the nearest integer. e.g. 14.1 means [14..15)

-(void) setVisibility:(BOOL) visible fromZoomLevel:(float) fromZoomLevel toZoomLevel:(float) toZoomLevel

Sets the visibility of the map object for a range of zoom levels.

This method can only be used after the NMAMapObject has been added to the map. By default, the map object is visible at all zoom levels. Each zoom level retains its own visibility state.

If you make the following calls:

#1. visible property is set to YES
    |111111111111111111111|
#2. setVisible:NO fromZoomLevel:10 toZoomLevel:16
               10    16
              |0000000|
#3. setVisible:YES fromZoomLevel:5 toZoomLevel:13
          5       13
         |111111111|
#4. setVisible:NO atZoomLevel:20

The result is a map object that is invisible at zoom levels 14-16 and 20 and visible at the others.

      5        14 17 20
|111111111111110001110|
Note:

This will take effect if/when the map object's visibile property is set YES.

Parameters:

  • visible

    indicates whether the map object should be visible.

  • fromZoomLevel

    clamped to range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel, rounded off to the nearest integer.

  • toZoomLevel

    clamped to range NMAMapViewMinimumZoomLevel..NMAMapViewMaximumZoomLevel, rounded off to the nearest integer.

-(NSUInteger) uniqueId

Returns the unique ID value of the NMAMapObject.

Note:

This value will be consistent for the lifetime of the object.

Returns:

The unique ID

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.