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
-
The property name to use when specifying options for this service within the
H.service.Platform.Options#servicesConfig. -
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
removeEventListenerordisposeon the given object when you no longer need it.Name Type Description typestring The name of the event
handlerfunction An event handler function
opt_captureboolean optional trueindicates that the method should listen in the capture phase (bubble otherwise)opt_scopeObject 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
EventTargetobject is being disposed.Name Type Description callbackfunction The callback function.
opt_scopeObject 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 tileTypestring An identifier of the tile type
schemestring An identifier of the tile scheme
tileSizenumber A value indicating the tile size
formatstring An identifier of the tile image format
opt_additionalParametersH.service.ServiceParameters optional A hash of additional parameters to be sent to HERE Map Tile API with each tile request.
opt_opacitynumber optional The opacity of the map tiles in range
[0...1], the default is1.0.opt_darkboolean optional Indicates whether the content of this layer is mainly dark, the default is
false. See alsoH.Map.Options#autoColor.opt_optionsH.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 tileTypestring An identifier of the tile type
schemestring An identifier of the tile scheme
tileSizenumber A value indicating the tile size
formatstring An identifier of the tile image format
opt_additionalParametersH.service.ServiceParameters optional a hash of additional parameters to be sent to the HERE Map Tile API with each tile request
opt_optionsH.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
EventTargetobject.Name Type Description evtH.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
EventTargetmay need to override this method in order to remove references to DOM Elements and additional listeners. -
This method retrieves the map tile type provided by this service.
Returns:
Type Description string A value indicating the map tile type -
getUrl ()H.service.Url inherited
-
This method returns the configured service URL.
Returns:
Type Description H.service.Url -
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
EventTargetinstance.Name Type Description typestring The name of the event
handlerfunction A previously added event handler
opt_captureboolean optional trueindicates that the method should listen in the capture phase (bubble otherwise)opt_scopeObject optional An object defining the scope for the handler function
Type Definitions
-
This type encapsulates information about a
MapTileService.Properties:
Name Type Description mapsObject.<string, Object> Identifiers of the supported map types
schemesObject.<string, Object> Identifiers of the supported map tile schemes
tiletypesObject.<string, Object> Identifiers of the supported map tile types
formatsObject.<string, Object> Identifiers of the supported map tile image formats
resolutionsObject.<string, Object> Identifiers of the supported map tile resolutions
languagesObject.<string, Object> Identifiers of the supported map tile languages
-
The type defines the configuration (initialization) options for a
MapTileService.Properties:
Name Type Argument Description baseUrlH.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
subDomainstring <optional>
The subdomain of the map tile service relative to the platform's base URL, the default is
"maps"pathstring <optional>
The path of the map tile service, the default is
"maptile/2.1"headersObject <optional>
A map of HTTP headers to be sent with each request made by the service
typestring <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)
versionstring <optional>
The map version hash to use for retrieving tiles, the default is the newest and it is automatically updated
shardsArray.<string> <optional>
Names of shards
Events
-
This event is fired when the copyright information for the given service has been successfully retrieved.
Type:
-
This event is fired when the info resource for the given service has been successfully retrieved and processed.
Type:
-
This event is fired when the version hash for the given service has been successfully updated.
Type: