Class: MapTileService

H.service.MapTileService

new H.service.MapTileService (opt_options) Deprecated : since 3.1.40.0

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.

Name Type Description
opt_options H.service.MapTileService.Options optional

Configuration options for map tile service

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

Extends

Members

H.service.MapTileService.CONFIG_KEY string staticconstant

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

getInfo

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.

Methods

addEventListener (type, handler, opt_capture, opt_scope) inherited

This method adds a listener for a specific event.

Note that to prevent potential memory leaks, you must either call removeEventListener or dispose on the given object when you no longer need it.

Name Type Description
type string

The name of the event

handler function

An event handler function

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function

addOnDisposeCallback (callback, opt_scope) inherited

This method adds a callback which is triggered when the EventTarget object is being disposed.

Name Type Description
callback function

The callback function.

opt_scope Object optional

An optional scope for the callback function

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.

Name Type Description
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:
Type Description
H.map.layer.TileLayer An object representing the newly create tile layer

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.

Name Type Description
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:
Type Description
H.map.provider.ImageTileProvider An object representing the image tile provider

dispatchEvent (evt) inherited

This method dispatches an event on the EventTarget object.

Name Type Description
evt H.util.Event | string

An object representing the event or a string with the event name

dispose () inherited

This method removes listeners from the given object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

getType ()string

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

Returns:
Type Description
string A value indicating the map tile type

This method returns the configured service URL.

Returns:
Type Description
H.service.Url

getVersion ()string

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

Returns:
Type Description
string Contains meta information for this map tile service

removeEventListener (type, handler, opt_capture, opt_scope) inherited

This method removes a previously added listener from the EventTarget instance.

Name Type Description
type string

The name of the event

handler function

A previously added event handler

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function

Type Definitions

H.service.MapTileService.Info Object

This type encapsulates information about a MapTileService.

Properties:
Name Type Description
maps Object.<string, Object>

Identifiers of the supported map types

schemes Object.<string, Object>

Identifiers of the supported map tile schemes

tiletypes Object.<string, Object>

Identifiers of the supported map tile types

formats Object.<string, Object>

Identifiers of the supported map tile image formats

resolutions Object.<string, Object>

Identifiers of the supported map tile resolutions

languages Object.<string, Object>

Identifiers of the supported map tile languages

H.service.MapTileService.Options Object

The type defines the configuration (initialization) options for a MapTileService.

Properties:
Name Type Argument Description
baseUrl H.service.Url <optional>

The base URL of the map tile service. If supplied, it overrides all defaults (either coming from platform or service internals) including authentication params

subDomain string <optional>

The subdomain of the map tile service relative to the platform's base URL, the default is "maps"

path string <optional>

The path of the map tile service, the default is "maptile/2.1"

headers Object <optional>

A map of HTTP headers to be sent with each request made by the service

type string <optional>

The type of the map tile service with which to communicate, for example 'base' (default), 'aerial', etc. (Refer to HERE Map Tile API documentation for available types)

version string <optional>

The map version hash to use for retrieving tiles, the default is the newest and it is automatically updated

shards Array.<string> <optional>

Names of shards

Events

copyrightupdate

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

Type:

infoupdate

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

Type:

versionupdate

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

Type: