Use the Map

One of the core features of the HERE SDK for iOS is Mapping, which includes adding a map view, changing the location displayed by the map, and modifying its properties. The primary component of the mapping API is the map view, which is integrated as a UIView subclass. The map view represents a vector based view to display a map and various properties.

HERE map data is updated on a weekly basis to ensure you always get the freshest map data available. By integrating the map view you can automatically benefit from this.


If you want to create a simple map application, refer to the Get Started section.

To manipulate the map and its properties it's best to start looking at the Camera section. More features include:

  • Map gestures to handle common map gestures and default map behaviors like pan or rotate.
  • Map schemes to instantly switch default map styles such as satellite versus normal map layer. More on the available map schemes you can find below.
  • Map items to place objects and shapes onto the map and interact with them.
  • Custom map styles to load custom map schemes.

Performance Optimization

By default, the MapView is rendered with 60 frames per second (FPS). Via mapView.frameRate the maximum frame rate can be adjusted - for example, to reduce CPU / GPU usage on low end devices. It is also possible to deactivate automatic render cycles by setting FPS to 0. Setting negative values has no effect. The value can be set individually per MapView instance - in case your app contains multiple MapView's.

Another option is to use custom map styles that contain less elements to render.

To shrink the size of the HERE SDK framework, unused fonts can be removed before shipping an application.

Load Map Schemes

The HERE SDK supports five preconfigured map schemes:

  • normalDay: A lossless scaleable vector base map for usage during daylight.
  • normalNight: A lossless scaleable vector base map for usage during night.
  • hybridDay: A day version of a hybrid scheme combining satellite imagery with vector street network, map labels and POI information.
  • hybridNight: A night version of a hybrid scheme combining satellite imagery with vector street network, map labels and POI information.
  • satellite: A bitmap based map showing satellite imagery for various zoom stages.

Note that it is also possible to fully customize your own map styles, except for the satellite imagery.

Use the following code snippet to load a map scheme:

let mapScheme = MapScheme.normalDay;
mapView.mapScene.loadScene(mapScheme: mapScheme, completion: onLoadScene)


// Completion handler when loading a map scene.
private func onLoadScene(mapError: MapError?) {
    guard mapError == nil else {
        print("Error: Map scene not loaded, \(String(describing: mapError))")

    // ...

It is recommended to use the day variants during day time when the surrounding light is brighter. The night variants are optimized for usage when there is less light. For example, an application may switch from day to night scheme when a driver is passing through a tunnel - if you are using the Navigate Edition, you can get notified on changed road attributes to know when you are driving through a tunnel. This allows an application to switch the map scheme on the fly. Note that this is not happening automatically.

The HERE SDK is also not automatically detecting the current time of the day to switch between day and night modes. An application may decide to do this based on the user's configuration or by checking the device clock.


In addition, the HERE SDK offers a satellite scheme, that does not contain any labels:


The available map styles are optimized to easily add additional content and overlays onto the base map without visual interference. The map schemes are less colorful and support a clean and neutral tone to maximize readability even in case of color blindness:

  • The street network is designed in gray scales and provides a hierarchy through brightness, contrast and widths.
  • Colors are overall rather bright set up.
  • Key colors are grey, blue, green, white.

Add Map Layers

On top of map schemes, the HERE SDK allows to add certain kinds of layers that show additional information such as the current traffic flow. Below you can see how such layers can be enabled with one line of code:

mapView.mapScene.setLayerState(layerName: MapScene.Layers.trafficFlow,
                               newState: MapScene.LayerState.visible)
mapView.mapScene.setLayerState(layerName: MapScene.Layers.trafficIncidents,
                               newState: MapScene.LayerState.visible)
mapView.mapScene.setLayerState(layerName: MapScene.Layers.safetyCameras,
                               newState: MapScene.LayerState.visible)
mapView.mapScene.setLayerState(layerName: MapScene.Layers.vehicleRestrictions,
                               newState: MapScene.LayerState.visible)

Note that not all layers are available for all editions.

Remove Unused Font Files

The HERE SDK contains fonts to render map labels for all supported languages. If you want to optimize the size of the overall app, you can remove selected fonts. For example, the font with Chinese, Japanese and Korean characters is around 3.5 MB. To remove this font, open the heresdk.framework file and remove the following files:

  • assets/geoviz/DroidSansFallback.ttf

When you remove a font, it is recommended to switch the map language to any other language than the removed font. At least one font needs to be left to see any map labels. Note that each time a label needs to be displayed in a language for a font that was removed an error message is logged - for each character that is missing.

Set a Map Language

You can customize the language that is used on the map to show labels for streets, cities and other map data. By default, the local language of a region is used.

Call mapView.primaryLanguage = languageCode to set the language for the world - or set nil to switch back to the default behavior. If a language is not supported in any region of the world, the local language for that region is shown instead.

Availability of Map Data

By default, a few regions in the world including Japan, China and Korea, contain limited map data. To get access to the full map data, please get in contact with your HERE representative.

Adapt Map Caching

To better support online and offline use cases, the HERE SDK supports caching of downloaded vector map data. This happens in the background. While interacting with the map, the data is stored locally on the device and can be accessed even when the device loses connection or operates in an offline mode.

The integrated map caching mechanism supports the standard vector based map schemes - satellite images and other raster tiles are also cached, but in a different cache that is not configurable.

Please note that the amount of cached data is limited and will be overwritten with new map data while using the map. In most cases, this is sufficient to give the user the impression of a faster start-up time - as no additional data must be downloaded when you start an app again at the same location as before.

When the cache is full, a least recently used (LRU)) strategy is applied.

The cache path and maximum size can be specified when manually initializing the HERE SDK using SDKOptions. Note that the cache path can be also set via your Info.plist file. Check the Engines section for more details.

HERE Logo Watermark

When using the HERE SDK, it is required that the HERE logo is always visible on the map view. By default, the HERE logo is located at the bottom right corner of the map. However, you can easily customize its location to meet your app design by calling setWatermarkPosition() on your map view instance. It is recommended to change the default placement only when it is required due to overlapping UI elements. Note for very small views: If both edges of the map are less than 250 density independent pixels in size, the watermark will be hidden automatically.

results matching ""

    No results matching ""