HERE iOS SDK Developer's Guide

NMAMapRoute

Class Summary

class NMAMapRoute

Derived from: NMAMapObject

Represents a NMAMapObject in the shape of a route that can be displayed on a map.

Include: NMAKit.framework/headers/NMAMapRoute.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMapRoute

[For complete information, see the section Class Details]

See also:

NMARoute

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, strong] UIColor *  color

The UIColor representing the color of the NMAMapRoute

[readable, writable, assign] BOOL  maneuverNumberDisplayed

Indicates whether the maneuver number is displayed on the NMAMapRoute

[readable, writable, assign] NMAMapRouteRenderType   renderType

The NMAMapRouteRenderType associated with NMAMapRoute

[readable, writable, strong] NMARoute route

The NMARoute represented by the NMAMapRoute

[readable, writable, assign] BOOL  trafficEnabled

Indicates whether the route object is displaying traffic information

[readable, writable, strong] UIColor *  traveledColor

The UIColor representing the traveled color of the NMAMapRoute

[readable, writable, assign] NSUInteger  zIndex

The NSUInteger z-index (stacking order) for the NMAMapRoute within its containing NMAMapView. It only applies within the multiple NMAMapRoute objects added to a Map.

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(nonnull instancetype) init

Use mapRouteWithRoute to instantiate a NMAMapRoute

-(nullable instancetype) initWithRoute:(nonnull NMARoute *) route

A constructor for NMAMapRoute

Class Method Summary

Table 3. Class Methods
Class Methods

+(nullable instancetype) mapRouteWithRoute:(nonnull NMARoute *) route

A convenience constructor for NMAMapRoute

+(nonnull instancetype) new

Class Details

Represents a NMAMapObject in the shape of a route that can be displayed on a map.

In order to display the route object on the map, the route object needs to be added to an NMAMapView by calling addMapObject:.

The NMAViewObject location property for a NMAMapRoute returns the coordinates of the first waypoint.

See also:

NMARoute

Public Property Details

[readable, writable, strong] UIColor * color

The UIColor representing the color of the NMAMapRoute.

Setting this property will change the color of the route and change renderType to NMAMapRouteRenderTypeUserDefined.

If renderType is set to NMAMapRouteRenderTypeUserDefined getting this property will return the value you set. Otherwise, will return nil.

Defaults to a shade of blue.

Note:

Alpha-value transparency is supported.

[readable, writable, assign] BOOL maneuverNumberDisplayed

Indicates whether the maneuver number is displayed on the NMAMapRoute.

[readable, writable, assign] NMAMapRouteRenderType  renderType

The NMAMapRouteRenderType associated with NMAMapRoute.

Setting color or traveledColor properties will reset NMAMapRouteRenderType to its default value.

Default value is NMAMapRouteRenderTypeUserDefined.

Note:

NMAMapRoute must be added to a NMAMapView before setting this property. Otherwise, except for NMAMapRouteRenderTypeUserDefined type, the property value will not change.

[readable, writable, strong] NMARouteroute

The NMARoute represented by the NMAMapRoute.

[readable, writable, assign] BOOL trafficEnabled

Indicates whether the route object is displaying traffic information.

YES will display traffic if the following are set: [ NMAMapView setTrafficVisible:YES] and [ NMAMapView showTrafficLayers:NMATrafficLayerOnRoute]. NO will hide traffic on route rendering for this route. By default traffic on route is disabled.

Note:

Truck routes and public transport timetable routes are not supported.

[readable, writable, strong] UIColor * traveledColor

The UIColor representing the traveled color of the NMAMapRoute.

Setting this property will change the traveled color of the route and change renderType to NMAMapRouteRenderTypeUserDefined.

If renderType is set to NMAMapRouteRenderTypeUserDefined getting this property will return the value you set. Otherwise, will return nil.

traveledColor is not supported by NMATransitRoute and NMAUrbanMobilityRoute.

Defaults to a different shade of blue to the route color.

Note:

Alpha-value transparency is supported.

[readable, writable, assign] NSUInteger zIndex

The NSUInteger z-index (stacking order) for the NMAMapRoute within its containing NMAMapView. It only applies within the multiple NMAMapRoute objects added to a Map.

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

-(nonnull instancetype) init

Use mapRouteWithRoute to instantiate a NMAMapRoute.

-(nullable instancetype) initWithRoute:(nonnull NMARoute *) route

A constructor for NMAMapRoute.

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

Parameters:

  • route

    The route object from which to construct the NMAMapRoute.

Class Method Details

+(nullable instancetype) mapRouteWithRoute:(nonnull NMARoute *) route

A convenience constructor for NMAMapRoute.

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

Parameters:

  • route

    The route object from which to construct the NMAMapRoute.

+(nonnull instancetype) new

Instances of this class should not be initialized directly