Guidesv3.2 API Referencev3.1 API Reference
Guides

Scene structure overview

 The 3.1 version is deprecated

📘

Note

The 3.1 version of this API has been deprecated. For continued support and feature development, upgrade to the latest 3.2 version.

Base map style customization is done with HERE Style Editor.

The Maps API for JavaScript allows you to specify the visual characteristics and interactions of map features using custom map styles. You define these styles through scene files that utilize a declarative YAML-based map style syntax. The general structure of the configuration follows the rules outlined by the open-source Tangram rendering engine.

The scene file contains instructions that specify the data displayed on the map and its style. These files define various aspects of the map, including:

Sources

Scene files specify the data sources from which the map obtains data, for example, vector tilesets.

sources:
  omv:
    type: OMV

For more information, see Sources of vector data.

Styles

Contains the styles inherited from the default styles.

styles:
    dashed-lines:
        base: lines
        draw:
            dash: [2, 2]
            color: [0.055, 0.604, 0.914, 1.00]

For more information, see Custom map styles

Import

You can import and merge other YAML configuration files into the main style file, facilitating modularity and reuse of style definitions.

import:
  - ../poi.day.yaml

Scene

The scene is an optional element that defines various settings related to the overall map display and behavior.

scene:
  background:
    color: 'rgb(255, 255, 255)'  # Sets the background color to white

Global

Holds global variables that are used across layers

global:
  poi:
    default:
      visible: false # Disable POIs rendering by default

Layers

Layers group and style different types of map data. Each layer can have its own styling rules and properties. Layers can represent map features such as roads, buildings, water bodies, and more.

layers:
  water
    ...
  roads
    ...

For more information, see Tile layers in the HERE Vector Tile API documentation.

Next steps