Maps API for JavaScript Developer's Guide

H.service.MapTileService

Class Summary

Extends: H.util.EventTarget

This class encapsulates a map tile end point of the HERE Map Tile API.

[ 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

getType () : {string}

This method retrieves the map tile type provided by this service.

getVersion () : {string}

This method retrieves a hash representing the newest version of the given map tile service.

getInfo () : {(H.service.MapTileService.Info | undefined)}

This method retrieves meta information for the map tile service. It returns an object if the data associated with the given map tile service has been fetched.

createTileProvider (tileType, scheme, tileSize, format, opt_additionalParameters, opt_options) : {H.map.provider.ImageTileProvider}

This method creates a tile provider which uses the specified map tiles. This provider can be used as a data source for an ImageTileLayer.

createTileLayer (tileType, scheme, tileSize, format, opt_additionalParameters, opt_opacity, opt_dark, opt_options) : {H.map.layer.TileLayer}

This method creates a tile layer. This layer can be used as a layer on the map data model.

Events Summary

Table 3. Events
Events

infoupdate : {H.util.Event}

This event is fired when the info resource for the given service has been successfully retrieved and processed.

versionupdate : {H.util.Event}

This event is fired when the version hash for the given service has been successfully updated.

copyrightupdate : {H.util.Event}

This event is fired when the copyright information for the given service has been successfully retrieved.

Class Description

This class encapsulates a map tile end point of the HERE Map Tile API.

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#getMapTileService on a platform instance.

Example

// Assumption: the platform is instantiated
var mapTiler = platform.getMapTileService({type: 'aerial'}),
  tileLayer = mapTiler.createTileLayer('maptile', 'hybrid.day', 256, 'jpg');
map.setBaseLayer(tileLayer);

Constructor Details

H.service.MapTileService(opt_options)

Parameters:
 
opt_options:
{H.service.MapTileService.Options=} [optional]
 
Configuration options for map tile 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

getType () : {string}

This method retrieves the map tile type provided by this service.

Returns:
 
{string}
A value indicating the map tile type

getVersion () : {string}

This method retrieves a hash representing the newest version of the given map tile service.

Returns:
 
{string}
Contains meta information for this map tile service

getInfo () : {(H.service.MapTileService.Info | undefined)}

This method retrieves meta information for the map tile service. It returns an object if the data associated with the given map tile service has been fetched.

Returns:
 
{(H.service.MapTileService.Info | undefined)}
Contains meta information for the given map tile service, if available, otherwise undefined

createTileProvider (tileType, scheme, tileSize, format, opt_additionalParameters, opt_options) : {H.map.provider.ImageTileProvider}

This method creates a tile provider which uses the specified map tiles. This provider can be used as a data source for an ImageTileLayer.

Parameters:
 
tileType:
{string}
 
An identifier of the tile type
scheme:
{string}
 
An identifier of the tile scheme
tileSize:
{number}
 
A value indicating the tile size
format:
{string}
 
An identifier of the tile image format
opt_additionalParameters:
{H.service.ServiceParameters=} [optional]
 
a hash of additional parameters to be sent to the HERE Map Tile API with each tile request
opt_options:
{H.service.TileProviderOptions=} [optional]
 
Contains a set of options for the tile provider object
Returns:
 
{H.map.provider.ImageTileProvider}
An object representing the image tile provider

createTileLayer (tileType, scheme, tileSize, format, opt_additionalParameters, opt_opacity, opt_dark, opt_options) : {H.map.layer.TileLayer}

This method creates a tile layer. This layer can be used as a layer on the map data model.

Parameters:
 
tileType:
{string}
 
An identifier of the tile type
scheme:
{string}
 
An identifier of the tile scheme
tileSize:
{number}
 
A value indicating the tile size
format:
{string}
 
An identifier of the tile image format
opt_additionalParameters:
{H.service.ServiceParameters=} [optional]
 
A hash of additional parameters to be sent to HERE Map Tile API with each tile request.
opt_opacity:
{number=} [optional]
 
The opacity of the map tiles in range [0...1], the default is 1.0.
opt_dark:
{boolean=} [optional]
 
Indicates whether the content of this layer is mainly dark, the default is false. See also H.Map.Options#autoColor.
opt_options:
{H.service.TileProviderOptions=} [optional]
 
An additional set of options for the provider
Returns:
 
{H.map.layer.TileLayer}
An object representing the newly create tile layer

Event Details

infoupdate: {H.util.Event}

This event is fired when the info resource for the given service has been successfully retrieved and processed.

versionupdate: {H.util.Event}

This event is fired when the version hash for the given service has been successfully updated.

copyrightupdate: {H.util.Event}

This event is fired when the copyright information for the given service has been successfully retrieved.