Maps API for JavaScript Developer's Guide

H.service.omv.Provider

Class Summary

Extends: H.map.provider.RemoteTileProvider

This class represents a provider for continuous fetching of HERE Optimized Map Visualization (OMV) tiles.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

setStyle (style)

Sets the style to be used for rendering the provider data.

getStyle () : {H.map.Style}

To obtain the style used for rendering the provider data.

Class Description

This class represents a provider for continuous fetching of HERE Optimized Map Visualization (OMV) tiles.

Note that as this provider provides vector data, it can be used only with the WEBGL engine H.map.render.webgl.RenderEngine (see H.Map.Options#engineType).

Use one of the raster layers (e.g. raster.normal.map) from H.service.DefaultLayers when using the P2D engine.

Example

// Assumption: the platform is instantiated
var config = `
  sources:
  omv:
    type: OMV
  layers:
  road:
    data: {source: omv}
    draw:
    lines:
      order: 340
      width: 10
      color: blue
  `;
map.addLayer(
  new H.map.layer.TileLayer(
    new H.service.omv.Provider(platform.getOMVService(), new H.map.Style(config))));

Constructor Details

H.service.omv.Provider(service, style, opt_options)

Parameters:
 
service:
{H.service.omv.Service}
 
An object representing the OMV service.
style:
{H.map.Style}
 
The style to use for rendering data provided by the provider.
opt_options:
{H.service.omv.Provider.Options=} [optional]
 
The options to instantiate the provider
Throws:
 
{H.lang.InvalidArgumentError}
 
in case of invalid service or style

Method Details

setStyle (style)

Sets the style to be used for rendering the provider data.

Parameters:
 
style:
{H.map.Style}
 

getStyle () : {H.map.Style}

To obtain the style used for rendering the provider data.

Returns:
 
{H.map.Style}