Maps API for JavaScript Developer's Guide

Map Types

The underlying services to the HERE Maps API for JavaScript are the HERE Vector Tile API and HERE Map Tile API. These services provide map data in two distinct formats that both have their own use cases.

  • HERE Vector Tile API - provides data in the vector format that is suitable and optimized for rendering with the WebGL rendering engine. It provides opportunities to style the map, hide or show map features based on certain criteria etc.
  • HERE Map Tile API = provides map data as a raster image. This format is more suitable for the 2D rendering engine, but can be used with either (for example satellite imagery is available only through this service). This format is not as flexible as vector tiles but could be useful in cases when there's a need to support legacy systems.

Setting the base map type

To set the map style for a map easily, you can use the method createDefaultLayers() defined on the Platform class. The method returns an object that holds different map types:

  • Type omv represents vector layers and associated style information, see Vector
  • Types normal, satellite and terrain are the raster layers, each containing a set of named layers (map, base, xbase, traffic, labels). The named layers represent different styles of the map type and can be directly assigned as base layers to the map. For more details see Raster

Additional map overlays

Additionally the default map types object holds traffic flow and traffic incidents overlays shown below

Table 1. Additional overlays provided by the HERE Maps API for JavaScript
incidents flow

A map type layer can be referenced, using the standard JavaScript dot notation. For example, to indicate a transit map (layer) on a terrain map (type), you can write layers.terrain.transit, where layers is the name of a variable holding the return value from Platform.createDefaultLayers().