The HERE Maps API for JavaScript provides an easy way to use the HERE Map Tile API, which provides map images in a large choice of styles. In this respect, the Maps API for JavaScript acts as a flexible access facilitator, giving you, as a developer, not only a means to retrieve the basic map tile sets, but also the full selection of all the possible map styles provided by the HERE Map Tile API. All map types mentioned in this section are compatible both with the WebGL and HTML5 2D Canvas rendering engines.

Basic map types

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, besides vector map tiles, three different map types (normal, satellite and terrain), 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 a list of the default map layers for each map type, see below.

Default map types provided by the HERE Maps API for JavaScript

Layer: map. Map type: normal

Layer: map. Map type: satellite

Layer: map. Map type: terrain

Layer: transit. Map type: normal
Layer: transit. Map type: satellite
Layer: transit. Map type: terrain

Layer: xbase. Map type: normal

Layer: xbase. Map type: satellite

Layer: xbase. Map type: terrain

Layer: base. Map type: normal

Layer: base. Map type: satellite

Layer: base. Map type: terrain

Layer: labels. Map type: normal

Layer: labels. Map type: satellite

Layer: labels. Map type: terrain

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.raster.terrain.transit, where layers is the name of a variable holding the return value from Platform.createDefaultLayers().

results matching ""

    No results matching ""