Structure Overview

The general structure of the configuration follows the rules outlined by the open-source Tangram rendering engine. The style can be used for HERE Maps API for JavaScript, HERE Android SDK and HERE iOS SDK and uses YAML format. The configuration can contain eight root elements:

  • sources - mandatory section that defines the source of the vector data
  • styles - contains the styles inherited from the default styles (see Custom Styles)
  • layers - the section describes logical layers that describe how to render the data from the vector source (see Default Styles)
  • scene - is responsible for the global map settings (ex. background color)
  • global - holds global variables that are used across layers

The order of the elements affects the rendering outcome. The elements can be arranged according to your requirements.

Minimal Configuration

The minimal configuration must contain two blocks: sources and layers. The sources block defines the source of the vector data and must not be changed. The layers block contains descriptions of the rendering (logical) layers that use the sources as a data source.

# the sources section describes where the data for rendering comes from
# and must not be changed
sources:
    omv:
        type: OMV
        max_zoom: 17
        min_display_zoom: 1
# the layers section contains descriptions of the rendering (logical) layers
layers:
    # user defined name of the rendering layer
    water_areas:
        # the section defines where the rendering layer takes
        # its data from source: omv is mandatory for the Vector Tile API
        # layer: water specifies what vector layer is taken
        # for the rendering see REST API documentation for the
        # list of available layers.
        data: {source: omv, layer: water}
        # section defines how to render the layer
        draw:
            # default style name, it defines the type of geometries for rendering
            polygons:
                order: 1 # z-order of the layer
                color: [0.055, 0.604, 0.914, 1.00]

The example above contains single logical layer that uses omv source and the water data layer within this source. Available layers within the omv source are described in the Vector Tile REST API documentation. The logical layer also uses the polygon style for rendering the water areas - for more details about the style system and the styles section, see the corresponding chapter of the guide.

results matching ""

    No results matching ""