Maps API for JavaScript Developer's Guide

H.service.omv.Service

Class Summary

Extends: H.util.EventTarget

This class encapsulates HERE's Optimized Map Visualization (OMV) endpoint.

[ For full details, see the Class Details ]

Property Summary

Table 1. Properties
Properties

static CONFIG_KEY : {string}

The property name to use when specifying options for this service within the H.service.Platform.Options#servicesConfig.

Method Summary

Table 2. Methods
Methods

getMapVersion () : {(number | undefined)}

Returns the specified map version H.service.omv.Service.Options#mapVersion or the version corresponding to the latest map data. Map version information is fetched automatically during construction time of this service unless specific fixed mapVersion is specified.

createLayer (style, opt_options) : {H.map.layer.TileLayer}

To create an OMV map layer according to the passed configuration.

Events Summary

Table 3. Events
Events

copyrightupdate : {H.util.Event}

This event is fired when the service's copyrights were successfully retrieved.

Class Description

This class encapsulates HERE's Optimized Map Visualization (OMV) endpoint.

It's not allowed to call the constructor directly (an IllegalOperationError is thrown). Instead an instance of this Service can be retrieved by calling the factory method H.service.Platform#getOMVService on a platform instance.

Example

// Assumption: the platform is instantiated
omvService = platform.getOMVService();

Constructor Details

H.service.omv.Service(opt_options)

Parameters:
 
opt_options:
{H.service.omv.Service.Options=} [optional]
 
Configuration options for OMV service

Property Details

static CONFIG_KEY: {string}

The property name to use when specifying options for this service within the H.service.Platform.Options#servicesConfig.

Method Details

getMapVersion () : {(number | undefined)}

Returns the specified map version H.service.omv.Service.Options#mapVersion or the version corresponding to the latest map data. Map version information is fetched automatically during construction time of this service unless specific fixed mapVersion is specified.

Returns:
 
{(number | undefined)}
The map version to use when requesting the tiles

createLayer (style, opt_options) : {H.map.layer.TileLayer}

To create an OMV map layer according to the passed configuration.

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(platform.getOMVService().createLayer(new H.map.Style(config)));
Parameters:
 
style:
{H.map.Style}
 
The style to use for rendering data provided by the provider.
opt_options:
{H.map.provider.TileProvider.Options=} [optional]
 
The options to instantiate the provider
Returns:
 
{H.map.layer.TileLayer}

Event Details

copyrightupdate: {H.util.Event}

This event is fired when the service's copyrights were successfully retrieved.