HERE iOS SDK Developer's Guide

NMAMapContainer

Class Summary

class NMAMapContainer

Derived from: NMAMapObject

A container of NMAMapObject instances, containers can be added to a NMAMapView instance.

Include: NMAKit.framework/headers/NMAMapContainer.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMapContainer

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, weak] NSArray< NMAMapObject * > *  mapObjects

The NSArray of NMAMapObject objects within the NMAMapContainer

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) addMapObject:(nonnull NMAMapObject *) aMapObject

Adds a NMAMapObject to the NMAMapContainer.

-(BOOL) removeAllMapObjects

Removes all NMAMapObject objects from the NMAMapContainer

-(BOOL) removeMapObject:(nonnull NMAMapObject *) aMapObject

Removes the specified NMAMapObject from the NMAMapContainer

Class Details

A container of NMAMapObject instances, containers can be added to a NMAMapView instance.

Applications can, as necessary, add or remove certain types of NMAMapObject objects to or from a NMAMapContainer (refer to addMapObject: for details). A NMAMapContainer is also useful for grouping together NMAMapObject objects to allow application operations on entire groups of map objects without requiring an iterative approach to inspecting or changing the state of each individual NMAMapObject (e.g. for changing their visibility).

Note:

The zOrder of an NMAMapObject instance in a container is relative only to other NMAMapObject instances within the same container. Note that containers are derived from NMAMapObject also have zOrder.

Note:

You can use the visible property to control whether the objects in the container are visible. If the property set to true, then the visibility settings of each map object in the container are used. However, unlike other map objects, NMAMapContainer does not support the use of visibility masks, so you cannot set container visibility on a zoom level basis.

Public Property Details

[readable, weak] NSArray< NMAMapObject * > * mapObjects

The NSArray of NMAMapObject objects within the NMAMapContainer.

Instance Method Details

-(BOOL) addMapObject:(nonnull NMAMapObject *) aMapObject

Adds a NMAMapObject to the NMAMapContainer.

NMAMapObject types that can be added to a NMAMapContainer include:

Note:

Attempts to add an object twice to the same container will be ignored.

Note:

NMAMapRoute and NMAMapContainer cannot be added to a container. NMAMapRoute needs to be added directly to the NMAMapView (see NMAMapView::addMapObject:).

Parameters:

  • aMapObject

    A NMAMapObject to be added to the NMAMapContainer.

Returns:

YES if the NMAMapObject was added successfully, NO otherwise.

See also:

removeMapObject:

-(BOOL) removeAllMapObjects

Removes all NMAMapObject objects from the NMAMapContainer.

Returns:

YES if all NMAMapObject objects were removed successfully, NO otherwise.

-(BOOL) removeMapObject:(nonnull NMAMapObject *) aMapObject

Removes the specified NMAMapObject from the NMAMapContainer.

Note:

If the specified NMAMapObject is not contained within the NMAMapContainer, the container will be unchanged.

Parameters:

  • aMapObject

    A NMAMapObject to remove from the NMAMapContainer.

Returns:

YES if the NMAMapObject was removed successfully, NO otherwise.

See also:

removeAllMapObjects