HERE iOS SDK Developer's Guide

NMAMapView

Class Summary

class NMAMapView

Derived from: UIView

A UIView subclass used by an application to display a geographical map.

Include: NMAKit.framework/headers/NMAMapView.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMapView

[For complete information, see the section Class Details]

Public Enumeration Summary

Table 1. Public Enumerations
Public Enumerations

NMABaseMapLayer

Deprecated: Please use NMAMapLayerCategory instead.

Map layer enum mask

Public Property Summary

Table 2. Public Properties
Public Properties

[readable, weak] NMAGeoBoundingBox boundingBox

The NMAGeoBoundingBox representing the current screen area of the NMAMapView

[readable, writable, assign] CGRect  clipRect

The CGRect representing the NMAMapView clipping rectangle

[readable, assign] float  clippedTilt

The actual tilt used to render the map, in degrees

[readable, assign] NSString *  copyright

The copyright for the NMAMapView

[readable, writable, assign] float  copyrightLogoHorizontalMargin

The distance in points that the copyright logo will be from the left or right edge of the NMAMapView

[readable, writable, assign] NMALayoutPosition   copyrightLogoPosition

The copyright logo position for the NMAMapView

[readable, writable, assign] float  copyrightLogoVerticalMargin

The distance in points that the copyright logo will be from the top or bottom edge of the NMAMapView

[readable, assign] id< NMAMapGestureDelegate defaultGestureHandler

Provides default gesture handling behaviour for the NMAMapView from within a custom gesture handling method

[readable, writable, weak] id< NMAMapViewDelegate delegate

An event handler for the NMAMapView

[readable, weak] NSString *  displayLanguage

The language which the map is set to render

[readable, writable, assign] BOOL  extrudedBuildingsVisible

Control whether or not extruded buildings are visible on the map

[readable, writable, assign] NMAGeoCoordinates geoCenter

The NMAGeoCoordinates of the world location corresponding to the current screen position of the transformCenter

[readable, writable, weak] id< NMAMapGestureDelegate gestureDelegate

An optional delegate to process gestures on behalf of the map view

[readable, writable, assign] BOOL  kineticPanningEnabled

Indicates the kinetic panning behaviour of the NMAMapView

[readable, writable, assign] BOOL  landmarksVisible

Indicates 3D landmark visibility for the NMAMapView

[readable, writable, assign] NSTimeInterval  longPressDuration

The touch duration required to trigger a long press gesture

[readable, writable, assign] BOOL  mapCenterFixedOnRotateZoom

Indicates whether the transform center is used on rotate and zoom gestures

[readable, writable, assign] BOOL  mapInteractionEnabled

Indicates the state of enabling and modifying map gesture interaction for the NMAMapView

[readable, writable, strong] NSString *  mapScheme

The scheme for the NMAMapView

[readable, assign] NMAMapTransitLayer mapTransitLayer

The map transit layer for the NMAMapView

[readable, writable, strong] NMATiltZoomProfile   maximumTiltProfile

The functonal relationship between zoom and maximum tilt

[readable, assign] float  maximumZoomLevel

The current effective maximum zoom level of the map view

[readable, assign] float  minimumZoomLevel

The current effective minimum zoom level of the map view

[readable, writable, assign] float  orientation

The orientation for the NMAMapView, in a range of degrees between [0

[readable, writable, assign] BOOL  pauseOnWillResignActive

Controls whether the map view automatically pauses rendering when the willResignActive notification is received

[readable, assign] NMAPositionIndicator positionIndicator

The position indicator for the NMAMapView

[readable, writable, assign] NMAProjectionType   projectionType

The projection method used to display the map

[readable, writable, assign] BOOL  renderAllowed

A flag which can be used to allow or disallow map rendering

[readable, writable, assign] BOOL  safetySpotsVisible

Indicates if safety spots are visible on the map

[readable, weak] NSString *  secondaryDisplayLanguage

The secondary language which the map is set to render

[readable, writable, assign] BOOL  streetLevelCoverageVisible

Controls if Street Level Imagery coverage is rendered on the NMAMapView.

[readable, writable, assign] float  tilt

The desired tilt of the NMAMapView in degrees

[readable, writable, assign] BOOL  trafficVisible

Indicates traffic visibility for the NMAMapView.

[readable, writable, assign] CGPoint  transformCenter

The point at which map movements and animations are centered

[readable, writable, assign] NMAMapTransitDisplayMode   transitDisplayMode

The transit stop display mode for the NMAMapView

[readable, writable, assign] BOOL  twoFingerPanTiltingEnabled

Enables changing the tilt angle of the NMAMapView using a two finger pan

[readable, writable, assign] BOOL  upwardPanIncreasesTilt

Controls which two-finger pan direction increases the tilt value of the NMAMapView

[readable, writable, assign] BOOL  usesGestureRecognizers

Deprecated: As of SDK 3.2. All recognizer-based callbacks were removed. This attribute will always have a value NO.

Controls the type of gesture response used by the NMAMapView

[readable, assign] NMAVenue3dMapLayer venue3dMapLayer

Access venue3d map layer

[readable, writable, assign] float  zoomLevel

A measure of the apparent size of geographic features on the screen

Instance Method Summary

Table 3. Instance Methods
Instance Method Summary

-(BOOL) addClusterLayer:( NMAClusterLayer *) clusterLayer

Attaches cluster layer to the map

-(BOOL) addMapObject:( NMAMapObject *) object

Adds a NMAMapObject to the NMAMapView

-(BOOL) addMapObject:( NMAMapObject *) object toLayer:( NMAMapLayerType ) layer

-(BOOL) addMapObjects:(NSArray *) objects

Adds a NSArray of NMAMapObject objects to the NMAMapView

-(BOOL) addMapObjects:(NSArray *) objects toLayer:( NMAMapLayerType ) layer

Adds a NSArray of NMAMapObject objects to the NMAMapView

-(BOOL) addMapOverlay:( NMAMapOverlay *) overlay

Adds a NMAMapOverlay object to the NMAMapView

-(void) addMapTileLayer:( NMAMapTileLayer *) tileLayer

Adds a NMAMapTileLayer to the map view for rendering custom raster tiles

-( NMACustomizableScheme *) createCustomizableSchemeWithName:(NSString *) schemeName basedOnScheme:(NSString *) baseSchemeName

Create a customizable Scheme

-(void) disableMapGestures:( NMAMapGestureType ) gestures

Disable one or more NMAMapView gestures

-(void) enableMapGestures:( NMAMapGestureType ) gestures

Enable one or more NMAMapView gestures

-( NMAGeoCoordinates *) geoCoordinatesFromPoint:(CGPoint) point

Converts a specified on-screen point to an equivalent NMAGeoCoordinates object

-( NMAGeoCoordinates *) geoCoordinatesFromPoint:(CGPoint) point withAltitude:(float) altitude

Converts a specified on-screen point to an equivalent NMAGeoCoordinates object on a specific altitude

-( NMACustomizableScheme *) getCustomizableSchemeWithName:(NSString *) schemeName

Returns an NMACustomizableScheme object that points to an existing custom scheme of the given name

-(void) hideFleetFeature:( NMAMapFleetFeatureType ) fleetFeature

Hide fleet features of the specified type from the map

-(void) hidePedestrianFeature:( NMAMapPedestrianFeatureType ) pedestrianFeature

Hide pedestrian features of the specified type from the map

-(void) hideTrafficLayers:(NSInteger) layers

Hides one or more traffic layers.

-(id) initWithFrame:(CGRect) frame

Default initializer of a NMAMapView

-(BOOL) isFleetFeatureShown:( NMAMapFleetFeatureType ) fleetFeature

Returns whether a fleet feature type is set to be shown on the map

-(BOOL) isMapGestureEnabled:( NMAMapGestureType ) gesture

Queries whether or not a gesture type is enabled on the NMAMapView

-(BOOL) isMapLayerCategoryVisible:( NMAMapLayerCategory ) layerCategory

Check the visibility of a specific map layer category

-(BOOL) isMapLayerVisible:( NMABaseMapLayer ) layer

Deprecated: Please use isMapLayerCategoryVisible: instead.

Check the visibility of a specific map layer

-(BOOL) isPedestrianFeatureShown:( NMAMapPedestrianFeatureType ) pedestrianFeature

Returns whether a pedestrian feature type is set to be shown on the map, whether the feature is actually rendered is dependent on the mapScheme property

-(BOOL) isPoiCategoryVisible:( NMAMapPoiCategory ) poiCategory

Check the visibility of a specific POI on the map

-(BOOL) isTrafficLayerVisible:( NMATrafficLayer ) layer

Queries whether a given traffic layer is displayed

-(NSArray *) mapTileLayers

Returns an array of NMAMapTileLayer instances that have been added to the map view

-(float) maximumTiltAtZoomLevel:(float) zoomLevel

Returns the maximum allowed tilt at a given zoom level

-(float) metersPerPointAtZoomLevel:(float) zoomLevel

Get the screen-space to world-space conversion factor at a specified zoom level

-(float) minimumTiltAtZoomLevel:(float) zoomLevel

Returns the minimum allowed tilt at a given zoom level

-(NSArray *) objectsAtPoint:(CGPoint) point

Returns a NSArray of all NMAMapObject objects that are selected at a specified point on the screen

-(NSArray *) poiCategories

Get the list of poi categories

-(double) pointDistanceFromGeoCoordinates:( NMAGeoCoordinates *) startCoordinates toGeoCoordinates:( NMAGeoCoordinates *) endCoordinates

Calculates the point distance between two geo coordinates

-(CGPoint) pointFromGeoCoordinates:( NMAGeoCoordinates *) coordinates

Converts a specified NMAGeoCoordinates object to its equivalent point in screen space.

-(BOOL) removeClusterLayer:( NMAClusterLayer *) clusterLayer

Detaches the cluster from the map

-(BOOL) removeCustomizableSchemeWithName:(NSString *) schemeName

Removes the custom scheme with the specified name from the map.

-(BOOL) removeEventBlockWithIdentifier:(NSInteger) identifier

Removes the event block with the given identifier

-(BOOL) removeMapObject:( NMAMapObject *) object

Removes an existing NMAMapObject from the NMAMapView

-(BOOL) removeMapObjects:(NSArray *) objects

Removes a NSArray of NMAMapObject objects from the NMAMapView

-(BOOL) removeMapOverlay:( NMAMapOverlay *) overlay

Removes an existing NMAMapOverlay object from the NMAMapView

-(void) removeMapTileLayer:( NMAMapTileLayer *) tileLayer

Removes a NMAMapTileLayer from the map view

-(NSInteger) respondToEvents:(NSInteger) events withBlock:( NMAMapEventBlock ) block

Provides a block of code to be executed upon the occurrence of one or more map events

-(NSArray *) roadElementsInArea:( NMAGeoBoundingBox *) geoArea

Get the road elements for a geo bounding area

-(void) setBoundingBox:( NMAGeoBoundingBox *) boundingBox insideRect:(CGRect) screenRect withAnimation:( NMAMapAnimation ) animationType

Transforms the map to fit an arbitrary geo bounding box with the bounds of a specific screen region with optional animation

-(void) setBoundingBox:( NMAGeoBoundingBox *) boundingBox withAnimation:( NMAMapAnimation ) animationType

Sets the geo bounding box of the map view with optional animation

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter withAnimation:( NMAMapAnimation ) animationType

Sets the geoCenter of the map with optional animation

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter zoomLevel:(float) zoomLevel orientation:(float) orientation tilt:(float) tilt withAnimation:( NMAMapAnimation ) animationType

Simultaneously sets one or more map transformation properties with optional animation

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter zoomLevel:(float) zoomLevel withAnimation:( NMAMapAnimation ) animationType

Simultaneously sets the geoCenter and zoomLevel of the map with optional animation

-(void) setGeoCoordinates:( NMAGeoCoordinates *) coordinates toPoint:(CGPoint) point withAnimation:( NMAMapAnimation ) animation

Positions the NMAMapView so that the specified world location coincides with the specified screen location

-(void) setGeoCoordinates:( NMAGeoCoordinates *) coordinates toPoint:(CGPoint) point withAnimation:( NMAMapAnimation ) animation zoomLevel:(float) zoomLevel orientation:(float) orientation tilt:(float) tilt

Positions the NMAMapView so that the specified world location coincides with the specified screen location

-(void) setOrientation:(float) orientation withAnimation:( NMAMapAnimation ) animationType

Sets the orientation of the map with optional animation

-(void) setTilt:(float) tilt withAnimation:( NMAMapAnimation ) animationType

Sets the tilt of the map with optional animation

-(void) setVisibility:(BOOL) visible forMapLayerCategories:(NSArray *) layerCategories

Set the visibility of the map layer categories to be rendered

-(BOOL) setVisibility:(BOOL) visible forMapLayers:(NSInteger) layers

Deprecated: Please use setVisibility:forMapLayerCategories: instead.

Set the visibility of a specific sets of map rendering layers

-(BOOL) setVisibility:(BOOL) visible forPoiCategory:( NMAMapPoiCategory ) poiCategory

Set the visibility of a specific POI on the map

-(void) setZoomLevel:(float) zoomLevel withAnimation:( NMAMapAnimation ) animationType

Sets the zoomLevel of the map with optional animation

-(void) showFleetFeature:( NMAMapFleetFeatureType ) fleetFeature

Show fleet features of the specified type on the map

-(void) showPedestrianFeature:( NMAMapPedestrianFeatureType ) pedestrianFeature

Show pedestrian features of the specified type on the map

-(void) showTrafficLayers:(NSInteger) layers

Displays one or more traffic layers.

-(void) snapshotWithBlock:(void)(UIImage *snapshot)) resultBlock

Records a static UIImage of the NMAMapView's current appearance. The map view will redraw itself before capturing the image.

-(BOOL) useDefaultDisplayLanguage

Set the map display language using the device preferred language

-(BOOL) useDisplayLanguageFromLocale:(NSLocale *) locale

Set the map display language using the locale specified

-(BOOL) useSecondaryDisplayLanguageFromLocale:(NSLocale *) locale

Set the secondary map display language using the locale specified

-(NSArray *) visibleMapLayerCategories

Get the set of visible map layer categories

-(NSInteger) visibleMapLayers

Deprecated: Please use visibleMapLayerCategories instead.

Get the visibility of all map layers

-(NSArray *) visibleObjectsAtPoint:(CGPoint) point

Returns a NSArray of all visible NMAMapObject objects that are selected at a specified point on the screen

Class Method Summary

Table 4. Class Methods
Class Methods

+(void) shouldBeginRenderingAutomatically:(BOOL) enabled

Used to control the default NMAMapView rendering behaviour

+(void) snapshotWithGeoCoordinates:( NMAGeoCoordinates *) coordinates zoomLevel:(float) zoom orientation:(float) orientation size:(CGSize) size block:(void)(UIImage *snapshot)) resultBlock

Creates a UIImage snapshot of an NMAMapView with the specified size and positioning.

Class Details

A UIView subclass used by an application to display a geographical map.

The NMAMapView will recognize and respond to a number of different gestures, which are described by the NMAMapGestureType enum. Subviews of the map may optionally receive these gestures instead of the map (see NMAMapGestureDelegate).

Note:

Views which depend on receiving touch events (such as UIButton) should not be installed as NMAMapView subviews, but rather as siblings in the view hierarchy.

Note:

NMAMapView requires valid authentication credentials to be set via NMAApplicationContext. If valid credentials are not present the API may not function correctly or may stop functioning correctly in the future when server side configurations change.

Public Enumeration Details

NMABaseMapLayer

Deprecated: Please use NMAMapLayerCategory instead.

Map layer enum mask

Enumeration Members:

  • NMABaseMapLayerLabels

    Park names, city centers, lake names, country/state names, names for other area and line features.

  • NMABaseMapLayerStreetLabels

    Street names, ferry names, highway signs, exit icons.

  • NMABaseMapLayerTraffic

    Traffic flow lines.

  • NMABaseMapLayerLines

    Line features like street networks, country/state borders.

  • NMABaseMapLayerStreetLevelCoverage

    Street Level coverage. Note that coverage is only drawn when coverage is enabled.

  • NMABaseMapLayerAreas

    Area features like park, water polygons.

  • NMABaseMapLayerBackground

    Background colors, satellite or terrain images.

  • NMABaseMapLayerSpecialFeatures

    Special features like truck attributes or environmental zones.

  • NMABaseMapLayerTerrain

    Terrain.

  • NMABaseMapLayerAll

    This value represents all options. It can be used as a mask.

Public Property Details

[readable, weak] NMAGeoBoundingBoxboundingBox

The NMAGeoBoundingBox representing the current screen area of the NMAMapView.

The boundingBox of the map is the smallest possible NMAGeoBoundingBox which contains all of the map area currently visible on the screen. If the map is in 2D view (zero tilt), the boundingBox should (nearly) exactly coincide with the bounds of the screen rect. If the map is in 3D view, the visible screen area is a trapezoid in geographical space (the visible area is wider at the top of the screen than at the bottom due to perspective). Thus, the bounding box will contain some area that is not actually visible on the screen in this case.

Note:

The bounding box may be slightly inaccurate if the method is invoked while the map is moving.

[readable, writable, assign] CGRect clipRect

The CGRect representing the NMAMapView clipping rectangle.

This property allows the user to restrict the rendered size of the NMAMapView without changing its frame size. The area outside the bounds of the CGRect is colored in the default map background color.

This property should be used when a known fixed region of the NMAMapView will be obscured for a significant amount of time, such as by a subview or popup menu.

Note:

The clipRect is not allowed to exceed the bounds of the NMAMapView frame, and the supplied CGRect will be clipped as necessary to ensure this. If a value is supplied which does not overlap the map frame, the clipRect is not changed.

[readable, assign] float clippedTilt

The actual tilt used to render the map, in degrees.

See also:

tilt

The copyright for the NMAMapView.

[readable, writable, assign] float copyrightLogoHorizontalMargin

The distance in points that the copyright logo will be from the left or right edge of the NMAMapView.

Note:

Values less than 10.0 will be ignored.

Note:

Does not apply when the copyrightLogoPosition is NMALayoutPositionTopCenter or NMALayoutPositionBottomCenter.

[readable, writable, assign] NMALayoutPosition  copyrightLogoPosition

The copyright logo position for the NMAMapView.

Note:

Valid values are NMALayoutPositionTopLeft, NMALayoutPositionTopCenter, NMALayoutPositionTopRight, NMALayoutPositionBottomLeft, NMALayoutPositionBottomCenter, and NMALayoutPositionBottomRight.

[readable, writable, assign] float copyrightLogoVerticalMargin

The distance in points that the copyright logo will be from the top or bottom edge of the NMAMapView.

Note:

Values less than 10.0 will be ignored.

[readable, assign] id< NMAMapGestureDelegatedefaultGestureHandler

Provides default gesture handling behaviour for the NMAMapView from within a custom gesture handling method.

The gestureHandler can be used to perform default gesture actions in addition to the gestureDelegate's custom behaviour.

Default actions are performed by calling the appropriate gesture handling method from within the gestureDelegate's custom implementation of that method. For example, to perform the default tap action in addition to custom behaviour, implement the NMAMapGestureDelegate method in your gestureDelegate class as follows:

-(void)mapView:(NMAMapView *)mapView didReceiveTapAtLocation:(CGPoint)location
{
    // Some custom behaviour...
    [mapView.defaultGestureHandler mapView:mapView didReceiveTapAtLocation:location];
    // More custom behaviour...
}

[readable, writable, weak] id< NMAMapViewDelegatedelegate

An event handler for the NMAMapView.

An object may be installed as the NMAMapView's delegate in order to respond to certain map events, such as object selection or map movement. See the NMAMapViewDelegate protocol for the full list of events.

[readable, weak] NSString * displayLanguage

The language which the map is set to render.

Note:

It is nil if the display language isn't set and the default language English (en) is being used.

[readable, writable, assign] BOOL extrudedBuildingsVisible

Control whether or not extruded buildings are visible on the map.

Note:

If set to YES, extruded buildings will be shown on the map. NO otherwise.

[readable, writable, assign] NMAGeoCoordinatesgeoCenter

The NMAGeoCoordinates of the world location corresponding to the current screen position of the transformCenter.

[readable, writable, weak] id< NMAMapGestureDelegategestureDelegate

An optional delegate to process gestures on behalf of the map view.

Replace this property with a custom class implementing the NMAMapGestureDelegate protocol to customize the gesture response behaviour of the map. Set to nil to restore the original gesture behaviour.

See also:

NMAMapGestureDelegate

[readable, writable, assign] BOOL kineticPanningEnabled

Indicates the kinetic panning behaviour of the NMAMapView.

When kinetic panning is enabled, at the conclusion of a pan gesture (when the user's finger is removed from the device), the map will continue moving in the direction and with the speed of the original pan before gradually coming to a stop.

[readable, writable, assign] BOOL landmarksVisible

Indicates 3D landmark visibility for the NMAMapView.

Landmarks not visible if access to this operation is denied. Contact your HERE representative for more information.

[readable, writable, assign] NSTimeInterval longPressDuration

The touch duration required to trigger a long press gesture.

Note:

The default value is 1 second.

[readable, writable, assign] BOOL mapCenterFixedOnRotateZoom

Indicates whether the transform center is used on rotate and zoom gestures.

By default disabled. If enabled, rotation and zoom will always be applied using the current transform center, instead of a point relative the touch interaction.

Note:

The transform center is usually the same as the screen's geometric center, except in cases where it makes sense to have it slightly modified (example: in guidance mode, the transform center is lowered a bit so that the route ahead is more visible in the map view).

[readable, writable, assign] BOOL mapInteractionEnabled

Indicates the state of enabling and modifying map gesture interaction for the NMAMapView.

If enabled, gesture handlers can be enabled to begin gesture handling. If disabled, all gesture handling is disabled and the gesture handler state cannot be modified.

[readable, writable, strong] NSString * mapScheme

The scheme for the NMAMapView.

See NMAMapScheme for supported schemes.

[readable, assign] NMAMapTransitLayermapTransitLayer

The map transit layer for the NMAMapView.

[readable, writable, strong] NMATiltZoomProfile  maximumTiltProfile

The functonal relationship between zoom and maximum tilt.

Using the maximumTiltProfile, an application may control the maximum tilt of a map at different zoom levels. The maximum applies to all sources of map tilt, including gestures and animations.

[readable, assign] float maximumZoomLevel

The current effective maximum zoom level of the map view.

The effective maximum zoom level depends on the current display parameters of the map and the device, and thus may change while using the map. The value will never be higher than NMAMapViewMaximumZoomLevel.

[readable, assign] float minimumZoomLevel

The current effective minimum zoom level of the map view.

The effective minimum zoom level depends on the current display parameters of the map and the device, and thus may change while using the map. The value will never be lower than NMAMapViewMinimumZoomLevel.

[readable, writable, assign] float orientation

The orientation for the NMAMapView, in a range of degrees between [0..360). Values outside this range will be clamped.

By default, the map is oriented with north toward the top of the map (zero degrees). As the orientation angle increases, the map rotates counter-clockwise so that at 90 degrees, east is toward the top of the map.

[readable, writable, assign] BOOL pauseOnWillResignActive

Controls whether the map view automatically pauses rendering when the willResignActive notification is received.

If pauseOnWillResignActive is set to NO, it is highly recommended that the mapView renderAllowed property is set to NO before the application delegate didEnterBackground method returns.

The default value is YES.

[readable, assign] NMAPositionIndicatorpositionIndicator

The position indicator for the NMAMapView.

[readable, writable, assign] NMAProjectionType  projectionType

The projection method used to display the map.

The default projection type is NMAProjectionTypeGlobe.

See also:

NMAProjectionType

[readable, writable, assign] BOOL renderAllowed

A flag which can be used to allow or disallow map rendering.

Note:

Setting renderAllowed to NO guarantees that the map will not draw again (but it will finish if a frame is in the middle of rendering), but the map may not redraw with renderAllowed set to YES if it is prevented from drawing for another reason.

Note:

The map can be hinted to redraw (if allowed) by calling setNeedsDisplay.

[readable, writable, assign] BOOL safetySpotsVisible

Indicates if safety spots are visible on the map.

Defaults to NO.

Safety spots can not be set visible if access to this operation is denied. Contact your HERE representative for more information.

[readable, weak] NSString * secondaryDisplayLanguage

The secondary language which the map is set to render.

Note:

It is nil if the secondary display language isn't set which is the default behaviour.

[readable, writable, assign] BOOL streetLevelCoverageVisible

Controls if Street Level Imagery coverage is rendered on the NMAMapView.

If YES, the areas of the map for which street level imagery is available will be highlighted in a light blue color. This is a visual representation of the information available programmatically via NMAStreetLevelCoverage.

You can obtain a 3D street level view for areas where street level imagery is supported by creating an NMAStreetLevelView and instructing it to move to an Geo Position representing the supported area.

The Street Level Imagery coverage is not visiable if access to this operation is denied. Contact your HERE representative for more information.

[readable, writable, assign] float tilt

The desired tilt of the NMAMapView in degrees.

The tilt controls the perspective at which the map is viewed. A value of zero degrees corresponds to looking straight down at the map from above. As the tilt value is increased, the view shifts to a 3D perspective. The tilt must be in the range [0, NMAMapViewMaximumTilt]. Values outside this range will be clamped.

The tilt of the map may be further constrained at some zoom levels. For example, no tilt is allowed at the lowest zoom levels when the globe is visible. This is to provide a better user experience when interacting with globe, since viewing a "tilted" globe does give any benefit.

The value specified here is the desired tilt, but the actual tilt used to render the map will be different if the desired tilt exceeds the lower or upper zoom-dependent limit. The actual tilt is given by the clippedTilt property.

The minimum and maximum allowed tilts at a given zoom level can be accessed using the minimumTiltAtZoomLevel: and maximumTiltAtZoomLevel: methods, respectively.

[readable, writable, assign] BOOL trafficVisible

Indicates traffic visibility for the NMAMapView.

This provides global control over traffic visibility on the map. To change the visibility of an individual NMATrafficLayer please see showTrafficLayers, hideTrafficLayers

Traffic can only be displayed on one map at a time. It is recommended that you turn off traffic display on other maps before enabling traffic display on a new map otherwise the results may be unpredictable. If multiple maps are shown at the same time with trafficVisible YES, only one will display traffic.

The traffic is not visible if access to this operation is denied. Contact your HERE representative for more information.

[readable, writable, assign] CGPoint transformCenter

The point at which map movements and animations are centered.

The transformCenter is a point within the bounds of the map that is used to orient the map during transformations. For example, when one of the setGeoCenter: methods is used, the specified geocoordinates will be aligned with the transformCenter on the screen.

The transformCenter is specified in relative coordinates in the range {[0, 1], [0, 1]}, with {0, 0} representing the upper left corner of the map and {1, 1} the lower right corner.

Note:

The default value is {0.5, 0.5}.

Note:

The center point of map movements caused by gestures will depend on the touch locations of the gestures and not on the transformCenter.

Note:

Values on or very near the edge of the map will be ignored.

Note:

Values above the horizon will be ignored.

[readable, writable, assign] NMAMapTransitDisplayMode  transitDisplayMode

The transit stop display mode for the NMAMapView.

[readable, writable, assign] BOOL twoFingerPanTiltingEnabled

Enables changing the tilt angle of the NMAMapView using a two finger pan.

If YES, a two-finger pan with horizontal finger placement and vertical pan direction will change the tilt angle.

If NO, all two-finger pans will be treated the same as one-finger pans by default. Custom two-finger pan behavior can still be implemented using NMAMapGestureDelegate.

Note:

The default value is YES.

[readable, writable, assign] BOOL upwardPanIncreasesTilt

Controls which two-finger pan direction increases the tilt value of the NMAMapView.

If YES, a two-finger pan gesture from the bottom to the top of the map will increase the tilt angle. In other words, the viewing angle changes to a more apparent 3D view.

If NO, such a gesture will decrease the tilt angle.

Note:

The default value is NO.

[readable, writable, assign] BOOL usesGestureRecognizers

Deprecated: As of SDK 3.2. All recognizer-based callbacks were removed. This attribute will always have a value NO.

Controls the type of gesture response used by the NMAMapView.

If the map view is set to use gesture recognizers, gesture recognition is performed with the use of the UIGestureRecognizer class from UIKit. Otherwise, the touch events received by the NMAMapView are interpreted directly.

Note:

The default value is NO.

[readable, assign] NMAVenue3dMapLayervenue3dMapLayer

Access venue3d map layer.

See also:

NMAVenue3dMapLayer

[readable, writable, assign] float zoomLevel

A measure of the apparent size of geographic features on the screen.

The zoom level determines how "close" the map view is to the surface of the Earth. Higher zoom levels give a closer view. An approximate description of the appearance of various zoom levels is given below:
  • 0 - World level
  • 3 - Continent level
  • 5 - Country level
  • 10 - City level
  • 15 - Block level
  • 18 - Street level

Zoom level values must be in the range [NMAMapViewMinimumZoomLevel, NMAMapViewMaximumZoomLevel]; invalid values will be clamped to this range. In addition to this fixed limit, the actual minimum zoom level allowed for a map will depend on display parameters such as the size of the map view and the PPI of the device.

See also:

NMAMapView::minimumZoomLevel

Instance Method Details

-(BOOL) addClusterLayer:( NMAClusterLayer *) clusterLayer

Attaches cluster layer to the map. From this moment on the markers added to the layer will be also added to the map. After the layer is added clustering will happen automatically.

Parameters:

  • clusterLayer

    Layer to add.

Returns:

YES if successfully added.

-(BOOL) addMapObject:( NMAMapObject *) object

Adds a NMAMapObject to the NMAMapView.

Note:

The object is added to NMAMapLayerTypeForeground layer.

Note:

Returns NO if the object has already been added (duplicates are not allowed).

Parameters:

  • object

    A NMAMapObject to add

Returns:

YES if the map object was added successfully, NO otherwise

-(BOOL) addMapObject:( NMAMapObject *) object toLayer:( NMAMapLayerType ) layer

Adds a NMAMapObject to the NMAMapView

Note:

The object is added to the specified NMAMapLayerType

Parameters:

  • object

    A NMAMapObject to add

  • layer

    A NMAMapLayerType layer to add the object to

Returns:

YES if the map object was added successfully, NO otherwise (if the object has already been added, as duplicates are not allowed).

-(BOOL) addMapObjects:(NSArray *) objects

Adds a NSArray of NMAMapObject objects to the NMAMapView.

Parameters:

  • objects

    A NSArray of NMAMapObject objects to add

Returns:

YES if all map objects were added successfully, NO otherwise

-(BOOL) addMapObjects:(NSArray *) objects toLayer:( NMAMapLayerType ) layer

Adds a NSArray of NMAMapObject objects to the NMAMapView.

Parameters:

  • objects

    A NSArray of NMAMapObject objects to add

  • layer

    A NMAMapLayerType layer to add the object to

Returns:

YES if all map objects were added successfully, NO otherwise

-(BOOL) addMapOverlay:( NMAMapOverlay *) overlay

Adds a NMAMapOverlay object to the NMAMapView.

Parameters:

  • overlay

    A NMAMapOverlay object to add

Returns:

YES if the map overlay was added successfully, NO otherwise

-(void) addMapTileLayer:( NMAMapTileLayer *) tileLayer

Adds a NMAMapTileLayer to the map view for rendering custom raster tiles.

Note:

Attempting to add a single NMAMapTileLayer instance to multiple NMAMapView instances is not supported and will result in undefined behavior.

Parameters:

-( NMACustomizableScheme *) createCustomizableSchemeWithName:(NSString *) schemeName basedOnScheme:(NSString *) baseSchemeName

Create a customizable Scheme. Please note this change is not permanently saved and valid only with application life cycle.

Note:

Creating a scheme may fail if the provided name was already used, or if deriving from a base scheme which does not exist.

Parameters:

  • schemeName

    Name of the new scheme which you want to create.

  • baseSchemeName

    Name of base scheme. New scheme will be derived from this base scheme.

Returns:

NMACustomizableScheme instance, or nil if the creation failed.

-(void) disableMapGestures:( NMAMapGestureType ) gestures

Disable one or more NMAMapView gestures.

Note:

Pass NMAMapGestureTypeAll to disable all gestures.

Note:

Disabling a gesture type will also disable that type for the NMAMapView's gestureDelegate, but subviews of the map will still receive that gesture type.

Parameters:

  • gestures

    A bit-mask combination of one or more NMAMapGestureType values.

-(void) enableMapGestures:( NMAMapGestureType ) gestures

Enable one or more NMAMapView gestures.

Note:

All gestures are enabled by default.

Note:

Pass NMAMapGestureTypeAll to enable all gestures.

Parameters:

  • gestures

    A bit-mask combination of one or more NMAMapGestureType values.

-( NMAGeoCoordinates *) geoCoordinatesFromPoint:(CGPoint) point

Converts a specified on-screen point to an equivalent NMAGeoCoordinates object.

Parameters:

  • point

    A point on the screen to convert

Returns:

The NMAGeoCoordinates, or nil if the conversaion failed

-( NMAGeoCoordinates *) geoCoordinatesFromPoint:(CGPoint) point withAltitude:(float) altitude

Converts a specified on-screen point to an equivalent NMAGeoCoordinates object on a specific altitude.

Parameters:

  • point

    A point on the screen to convert

  • altitude

    A height in meters on which geo coordinates need to be calculated.

Returns:

The NMAGeoCoordinates, or nil if the conversaion failed

-( NMACustomizableScheme *) getCustomizableSchemeWithName:(NSString *) schemeName

Returns an NMACustomizableScheme object that points to an existing custom scheme of the given name.

Note:

The custom scheme must have been previously created with method NMAMapViewbasedOnScheme:::createCustomizableSchemeWithName:basedOnScheme: otherwise it will fail returning nil.

Parameters:

  • schemeName

    the respective name of the scheme.

-(void) hideFleetFeature:( NMAMapFleetFeatureType ) fleetFeature

Hide fleet features of the specified type from the map.

By default all fleet features are hidden.

Parameters:

  • fleetFeature

    NMAMapFleetFeatureType to hide.

-(void) hidePedestrianFeature:( NMAMapPedestrianFeatureType ) pedestrianFeature

Hide pedestrian features of the specified type from the map.

By default all pedestrian features are hidden.

Parameters:

  • pedestrianFeature

    NMAMapPedestrianFeatureType to hide.

-(void) hideTrafficLayers:(NSInteger) layers

Hides one or more traffic layers.

The layers to be hidden are specified using the NMATrafficLayer enum. Traffic layers which are already hidden will not be affected.

Note:

No traffic layers will be shown unless trafficVisible is YES. However, changes to individual NMATrafficLayer visibility settings will be saved even if trafficVisible is currently NO. They will be applied when trafficVisible is YES.

Parameters:

  • layers

    An "OR" combination of layers to be hidden.

-(id) initWithFrame:(CGRect) frame

Default initializer of a NMAMapView.

  • The NMAMapView must have a container view.
  • Use the -[ NMAMapView initWithFrame:] method with the frame acting as the bounds of the container view.
  • The container view must have its property autoresizesSubviews = YES.
  • The map view must have its property autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight

Example:

IBOutlet UIView* _parentOfMapView; // Parent view is necessary to set the correct z-order.
NMAMapView* mapView;
---
mapView = [[NMAMapView alloc] initWithFrame:_parentOfMapView.frame];
[_parentOfMapView addSubview:mapView];_parentOfMapView.autoresizesSubviews = YES;
mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight;
Note:

If the frame of the NMAMapView is much larger than the main window of the UIApplication its rendering will be very slow and could give the impression of a frozen UI.

-(BOOL) isFleetFeatureShown:( NMAMapFleetFeatureType ) fleetFeature

Returns whether a fleet feature type is set to be shown on the map.

By default all fleet features are hidden.

Parameters:

  • fleetFeature

    NMAMapFleetFeatureType to query.

Returns:

YES if fleet features of the type specified are set to be shown on the map.

-(BOOL) isMapGestureEnabled:( NMAMapGestureType ) gesture

Queries whether or not a gesture type is enabled on the NMAMapView.

Parameters:

  • gesture

    The gesture type to query.

-(BOOL) isMapLayerCategoryVisible:( NMAMapLayerCategory ) layerCategory

Check the visibility of a specific map layer category.

Parameters:

  • layerCategory

    A specific map layer category.

Returns:

YES if the map layer category is visible, NO otherwise.

-(BOOL) isMapLayerVisible:( NMABaseMapLayer ) layer

Deprecated: Please use isMapLayerCategoryVisible: instead.

Check the visibility of a specific map layer.

Parameters:

  • layer

    A specific map layer.

Returns:

YES if the map layer is visible, NO otherwise.

-(BOOL) isPedestrianFeatureShown:( NMAMapPedestrianFeatureType ) pedestrianFeature

Returns whether a pedestrian feature type is set to be shown on the map, whether the feature is actually rendered is dependent on the mapScheme property.

By default all pedestrian features are hidden.

Note:

Even if pedestrian features are set to be shown they will not actually be rendered if the mapScheme property is set to a "Car Navaigation" scheme (e.g. NMAMapSchemeCarNavigationDay).

Parameters:

  • pedestrianFeature

    NMAMapPedestrianFeatureType to query.

Returns:

YES if pedestrian features of the type specified are set to be shown on the map.

-(BOOL) isPoiCategoryVisible:( NMAMapPoiCategory ) poiCategory

Check the visibility of a specific POI on the map.

Parameters:

  • poiCategory

    A specific POI category.

Returns:

YES if POI is visible, NO otherwise

-(BOOL) isTrafficLayerVisible:( NMATrafficLayer ) layer

Queries whether a given traffic layer is displayed.

Note:

By default all traffic layers are visible.

Note:

No traffic layers will be shown unless trafficVisible is YES. However, the state of individual NMATrafficLayer visibility settings will still be saved when trafficVisible is NO. Therefore, this function may return YES even when trafficVisible is NO. The visibility settings will be applied when trafficVisible is YES.

Parameters:

  • layer

    The traffic layer type to check.

-(NSArray *) mapTileLayers

Returns an array of NMAMapTileLayer instances that have been added to the map view.

Returns:

NSArray of NMAMapTileLayer instances.

-(float) maximumTiltAtZoomLevel:(float) zoomLevel

Returns the maximum allowed tilt at a given zoom level.

-(float) metersPerPointAtZoomLevel:(float) zoomLevel

Get the screen-space to world-space conversion factor at a specified zoom level.

Note:

The conversion factor is based on a straight-line distance between two points; that is, it does not take into account the curvature of the Earth.

Parameters:

  • zoomLevel

    The zoom level at which to retrieve the conversion factor.

Returns:

The conversion factor in meters per point.

-(float) minimumTiltAtZoomLevel:(float) zoomLevel

Returns the minimum allowed tilt at a given zoom level.

-(NSArray *) objectsAtPoint:(CGPoint) point

Returns a NSArray of all NMAMapObject objects that are selected at a specified point on the screen.

Note:

Use isKindOfClass: to further determine NMAMapObject type instead of isMemberOfClass:.

Parameters:

  • point

    An on-screen CGPoint specified in logical coordinates

Returns:

The NSArray of selected NMAMapObject objects

-(NSArray *) poiCategories

Get the list of poi categories.

Returns:

A list of NSStrings.

-(double) pointDistanceFromGeoCoordinates:( NMAGeoCoordinates *) startCoordinates toGeoCoordinates:( NMAGeoCoordinates *) endCoordinates

Calculates the point distance between two geo coordinates.

Note:

The calculation will fail if the coordinates are too far apart or too far from the current location of the map.

Parameters:

  • startCoordinates

    Starting NMAGeoCoordinates

  • endCoordinates

    Ending NMAGeoCoordinates

Returns:

The point distance between the NMAGeoCoordinates, or -CGFLOAT_MAX if either of the coordinates parameters is nil or the calculation cannot be performed.

-(CGPoint) pointFromGeoCoordinates:( NMAGeoCoordinates *) coordinates

Converts a specified NMAGeoCoordinates object to its equivalent point in screen space.

Valid geo coordinates will produce a valid point, even if the coordinates are not on the screen or are above the visible horizon, as long as the coordinates are not too far from the current map location. To check if coordinates are within the bounds of the screen, use the CGRectContainsPoint method after making the conversion.

Parameters:

  • coordinates

    A NMAGeoCoordinates object to convert

Returns:

The on-screen CGPoint, or CGPoint.x = CGPoint.y = -CGFLOAT_MAX if the NMAGeoCoordinates object is nil

-(BOOL) removeClusterLayer:( NMAClusterLayer *) clusterLayer

Detaches the cluster from the map. After this call completes markers on this layer will be removed from the map.

Parameters:

  • clusterLayer

    Layer to remove.

Returns:

YES if successfully removed.

-(BOOL) removeCustomizableSchemeWithName:(NSString *) schemeName

Removes the custom scheme with the specified name from the map.

Parameters:

  • schemeName

    the respective name of the scheme

Returns:

BOOL True if succeeds, False if failed

-(BOOL) removeEventBlockWithIdentifier:(NSInteger) identifier

Removes the event block with the given identifier.

To explicitly control when an event block is removed from the map, the identifier returned by NMAMapViewwithBlock:::respondToEvents:withBlock: should be stored until needed and then passed to this method.

Note:

Do not call this method from inside the block to which the identifier is assigned.

Returns:

YES if the block was successfully removed, NO otherwise.

-(BOOL) removeMapObject:( NMAMapObject *) object

Removes an existing NMAMapObject from the NMAMapView.

Parameters:

  • object

    A NMAMapObject to remove

Returns:

YES if the map object was removed successfully, NO otherwise

-(BOOL) removeMapObjects:(NSArray *) objects

Removes a NSArray of NMAMapObject objects from the NMAMapView.

Parameters:

  • objects

    A NSArray of NMAMapObject objects to remove

Returns:

YES if all map objects were removed successfully, NO otherwise

-(BOOL) removeMapOverlay:( NMAMapOverlay *) overlay

Removes an existing NMAMapOverlay object from the NMAMapView.

Parameters:

  • overlay

    A NMAMapOverlay object to remove

Returns:

YES if the map overlay was removed successfully, NO otherwise

-(void) removeMapTileLayer:( NMAMapTileLayer *) tileLayer

Removes a NMAMapTileLayer from the map view.

Parameters:

  • tileLayer

    NMAMapTileLayer instance to be removed from the map view. Does nothing if tileLayer has not been added to the map view yet.

-(NSInteger) respondToEvents:(NSInteger) events withBlock:( NMAMapEventBlock ) block

Provides a block of code to be executed upon the occurrence of one or more map events.

While using an NMAMapView, an application might need to respond to certain map events that occur, such as map transformations or the beginning or ending of map gestures or animations. This method provides a mechanism by which an application may provide an arbitrary block of code to be executed in response to certain map events.

The same block may be used to respond to multiple events. The parameters passed to the event block include the event type, the map which generated the event, and optional event data. The event block returns a BOOL to indicate whether the block should continue to respond to the given event type. If a block no longer responds to any events, it is destroyed.

Each block is assigned a unique integer identifier, returned by this method. The identifier may be used to stop the block from responding to events without waiting for those events to be triggered, using the method NMAMapView::removeEventBlockWithIdentifier:.

When creating event handler blocks, care should be taken to avoid retain cycles. Any objects strongly referenced in the block will never be released as long as the block remains. This includes any explicit or implicit (e.g. through an instance variable) references to self. Ensure that any strongly referenced objects inside the block are meant to live as long as the block does; if not, use a weak reference.

Note:

Event blocks will always be invoked on the application's main thread.

Note:

Blocks which respond to frequent events (e.g. NMAMapEventGeoCenterChanged) should not perform any CPU-intensive work to avoid performance degradation.

Parameters:

  • events

    A bit-wise OR combination of NMAMapEvent values.

  • block

    The NMAMapEventBlock to respond to the given events.

Returns:

A unique integer value to identify the block.

See also:

NMAMapEvent

NMAMapView::removeEventBlockWithIdentifier:

-(NSArray *) roadElementsInArea:( NMAGeoBoundingBox *) geoArea

Get the road elements for a geo bounding area.

Parameters:

  • geoArea

    A NMAGeoBoundingBox to get the road elements

Returns:

NSArray of NMARoadElement of the geo area.

-(void) setBoundingBox:( NMAGeoBoundingBox *) boundingBox insideRect:(CGRect) screenRect withAnimation:( NMAMapAnimation ) animationType

Transforms the map to fit an arbitrary geo bounding box with the bounds of a specific screen region with optional animation.

Passing the bounds of the map view to this method is equivalent to calling setBoundingBox:withAnimation:.

Parameters:

  • boundingBox

    A NMAGeoBoundingBox to display after the transformation

  • screenRect

    The region of the view inside which the bounding box will be located.

  • animationType

    The animation method used to perform the transformation.

-(void) setBoundingBox:( NMAGeoBoundingBox *) boundingBox withAnimation:( NMAMapAnimation ) animationType

Sets the geo bounding box of the map view with optional animation.

After this method completes, the full extents of the specified geo bounding box will be visible in the map view. Depending on map orientation, this means that the boundingBox property may return a different value than the one passed to this method, because the map may be displaying some areas outside of the input bounding box.

Parameters:

  • boundingBox

    A NMAGeoBoundingBox to display after the transformation

  • animationType

    A NMAMapAnimation to illustrate the transformation

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter withAnimation:( NMAMapAnimation ) animationType

Sets the geoCenter of the map with optional animation.

Parameters:

  • geoCenter

    The NMAGeoCoordinates at which the map is centered.

  • animationType

    The animation method used to display the transformation.

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter zoomLevel:(float) zoomLevel orientation:(float) orientation tilt:(float) tilt withAnimation:( NMAMapAnimation ) animationType

Simultaneously sets one or more map transformation properties with optional animation.

Any combination of new properties may be passed to this method. To leave a property unchanged, pass nil (geoCenter) or NMAMapViewPreserveValue (zoomLevel, orientation, tilt) for that property.

Parameters:

  • geoCenter

    The new geoCenter.

  • zoomLevel

    The new zoomLevel.

  • orientation

    The new orientation.

  • tilt

    The new tilt.

  • animationType

    The animation method used to display the transformation.

-(void) setGeoCenter:( NMAGeoCoordinates *) geoCenter zoomLevel:(float) zoomLevel withAnimation:( NMAMapAnimation ) animationType

Simultaneously sets the geoCenter and zoomLevel of the map with optional animation.

Tilt and orientation are preserved.

Parameters:

  • geoCenter

    The new geoCenter.

  • zoomLevel

    The new zoomLevel.

  • animationType

    The animation method used to display the transformation.

-(void) setGeoCoordinates:( NMAGeoCoordinates *) coordinates toPoint:(CGPoint) point withAnimation:( NMAMapAnimation ) animation

Positions the NMAMapView so that the specified world location coincides with the specified screen location.

Note:

The screen point must be within the bounds of the map view.

Note:

Due to the curvature of the Earth, positioning may be inaccurate at low zoom levels.

Parameters:

  • coordinates

    The world location

  • point

    The screen location

  • animation

    The NMAMapAnimation type to use while moving the map

-(void) setGeoCoordinates:( NMAGeoCoordinates *) coordinates toPoint:(CGPoint) point withAnimation:( NMAMapAnimation ) animation zoomLevel:(float) zoomLevel orientation:(float) orientation tilt:(float) tilt

Positions the NMAMapView so that the specified world location coincides with the specified screen location.

Note:

The screen point must be within the bounds of the map view.

Note:

Due to the curvature of the Earth, positioning may be inaccurate at low zoom levels.

Parameters:

  • coordinates

    The world location

  • point

    The screen location

  • animation

    The NMAMapAnimation type to use while moving the map

  • zoomLevel

    Desired zoom level of the newly-centered NMAMapView (pass NMAMapViewPreserveValue to keep the current zoom level)

  • orientation

    Desired orientation of the newly-centered NMAMapView (pass NMAMapViewPreserveValue to keep the current orientation)

  • tilt

    Desired tilt angle of the newly-centered NMAMapView (pass NMAMapViewPreserveValue to keep the current tilt)

-(void) setOrientation:(float) orientation withAnimation:( NMAMapAnimation ) animationType

Sets the orientation of the map with optional animation.

Parameters:

  • orientation

    The orientation at which to set the map.

  • animationType

    The animation method used to display the transformation.

-(void) setTilt:(float) tilt withAnimation:( NMAMapAnimation ) animationType

Sets the tilt of the map with optional animation.

Parameters:

  • tilt

    The tilt at which to set the map.

  • animationType

    The animation method used to display the transformation.

-(void) setVisibility:(BOOL) visible forMapLayerCategories:(NSArray *) layerCategories

Set the visibility of the map layer categories to be rendered.

The layer categories are specified using the NMAMapLayerCategory enum.

Note:

Only the specified map layer categories visibility are changed, the visibility of all other map layer categories will remain the same.

Parameters:

  • visible

    YES to make map layer categories visible, NO to hide.

  • layerCategories

    An array of NSNumber objects containing NMAMapLayerCategory values.

-(BOOL) setVisibility:(BOOL) visible forMapLayers:(NSInteger) layers

Deprecated: Please use setVisibility:forMapLayerCategories: instead.

Set the visibility of a specific sets of map rendering layers.

The layers are specified using the NMABaseMapLayer enum. Use NMABaseMapLayerAll to select all map layers.

Note:

Only the specified map layers visibility are changed, the visibility of all other map layers will remain the same.

Parameters:

  • visible

    YES to make map layers visible, NO to hide map layers.

  • layers

    A specific sets of map layers.

Returns:

YES if enable or disable map layers successfully, NO otherwise.

-(BOOL) setVisibility:(BOOL) visible forPoiCategory:( NMAMapPoiCategory ) poiCategory

Set the visibility of a specific POI on the map.

Note:

NMAMapPoiCategoryAll may be used to show or hide all POIs.

Parameters:

  • visible

    YES if POI is visible, NO otherwise.

  • poiCategory

    A specific POI category.

Returns:

YES if enable or disable POI category successfully, NO otherwise.

-(void) setZoomLevel:(float) zoomLevel withAnimation:( NMAMapAnimation ) animationType

Sets the zoomLevel of the map with optional animation.

Parameters:

  • zoomLevel

    The zoomLevel at which to set the map.

  • animationType

    The animation method used to display the transformation.

-(void) showFleetFeature:( NMAMapFleetFeatureType ) fleetFeature

Show fleet features of the specified type on the map.

By default all fleet features are hidden.

Parameters:

  • fleetFeature

    NMAMapFleetFeatureType to show.

-(void) showPedestrianFeature:( NMAMapPedestrianFeatureType ) pedestrianFeature

Show pedestrian features of the specified type on the map.

By default all pedestrian features are hidden.

Note:

Even if pedestrian features are set to be shown they will not actually be rendered if the mapScheme property is set to a "Car Navaigation" scheme (e.g. NMAMapSchemeCarNavigationDay).

Parameters:

  • pedestrianFeature

    NMAMapPedestrianFeatureType to show.

-(void) showTrafficLayers:(NSInteger) layers

Displays one or more traffic layers.

The layers to be displayed are specified using the NMATrafficLayer enum. Traffic layers which are already visible will not be affected.

Note:

No traffic layers will be shown unless trafficVisible is YES. However, changes to individual NMATrafficLayer visibility settings will be saved even if trafficVisible is currently NO. They will be applied when trafficVisible is YES.

Parameters:

  • layers

    An "OR" combination of layers to be displayed.

-(void) snapshotWithBlock:(void)(UIImage *snapshot)) resultBlock

Records a static UIImage of the NMAMapView's current appearance. The map view will redraw itself before capturing the image.

When a snapshot is requested, a handler block is passed as the only parameter. when the snapshot is ready, the block is invoked, taking the UIImage snapshot as its sole input.

Only one snapshot may be requested at a time. If multiple requests are made together, only one snapshot will be produced and only the block passed with the last call to this method will be invoked.

This method is asynchronous. The snapshot will only be generated after the map has been re-rendered; thus, if the visual state of the map is changed immediately after calling this method (and before the block has executed), the generated snapshot will reflect the changes made to the map.

The snapshot will exactly match the appearance of the actual map view itself. Thus, if the map is moved to a location where data is not yet available and a snapshot requested, the snapshot will reflect the lack of map data. To ensure a useful snapshot in this case, the mapViewDidDraw: method of the NMAMapViewDelegate protocol can be used to trigger the snapshot after map data has been downloaded and rendered. Be aware that triggering a snapshot causes another redraw, so be sure to add protection to the snapshot call to avoid continuously requesting snapshots.

Note:

Objects drawn as part of the map ( NMAMapObject subclasses) will be captured in the snapshot; UI objects (such as subviews) will not.

-(BOOL) useDefaultDisplayLanguage

Set the map display language using the device preferred language.

Note:

If it fails, the map display language reverts to the default language which is English (en).

Returns:

True if the language is accepted by the map, false otherwise.

-(BOOL) useDisplayLanguageFromLocale:(NSLocale *) locale

Set the map display language using the locale specified.

Note:

If it fails, the map display language reverts to the default language which is English (en).

Parameters:

  • locale

    The NSLocale as described in <a href=" https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/ .

Returns:

True if the locale is accepted by the map and false otherwise.

-(BOOL) useSecondaryDisplayLanguageFromLocale:(NSLocale *) locale

Set the secondary map display language using the locale specified.

Setting a secondary display language will cause the language to be displayed below the primary language for some map labels (e.g. countries).

Note:

If it fails, the secondary map display language reverts to the last valid one.

Parameters:

  • locale

    The NSLocale as described in <a href=" https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/ . Pass nil if you want to remove the secondary map display language.

Returns:

True if the locale is accepted by the map and false otherwise.

-(NSArray *) visibleMapLayerCategories

Get the set of visible map layer categories.

Returns:

An NSArray of NSNumber objects containing the NMAMapLayerCategory values.

-(NSInteger) visibleMapLayers

Deprecated: Please use visibleMapLayerCategories instead.

Get the visibility of all map layers.

Returns:

The bitmap of map Layers visible.

-(NSArray *) visibleObjectsAtPoint:(CGPoint) point

Returns a NSArray of all visible NMAMapObject objects that are selected at a specified point on the screen.

Parameters:

  • point

    An on-screen CGPoint specified in logical coordinates

Returns:

The NSArray of selected NMAMapObject objects

Class Method Details

+(void) shouldBeginRenderingAutomatically:(BOOL) enabled

Used to control the default NMAMapView rendering behaviour.

This class method is used to set whether or not instances of NMAMapView will begin rendering immediately upon creation. Any map view created after passing NO to this method must have its renderAllowed property set to YES to begin rendering.

+(void) snapshotWithGeoCoordinates:( NMAGeoCoordinates *) coordinates zoomLevel:(float) zoom orientation:(float) orientation size:(CGSize) size block:(void)(UIImage *snapshot)) resultBlock

Creates a UIImage snapshot of an NMAMapView with the specified size and positioning.

This class method is used to create a static image of a map. A snapshot will have the same visual appearance as an NMAMapView with the same coordinates, zoom, orientation, and frame size.

When a snapshot is requested, a completion block is passed in as the final parameter. When the snapshot is ready, the block is invoked. Only one snapshot will be processed at a time, but any number may be queued up via successive calls to this method. Snapshots will be processed in the order they are received.

Note:

This method is asycnhronous.

Note:

Snapshots in regions where map data is not yet available will take longer to complete.

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.