Maps API for JavaScript Developer's Guide

H.map.Imprint

Class Summary

Extends: H.util.Disposable

Implements: H.util.ICapturable

This class encapsulates the brand, copyright and terms of use information displayed on the map.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

setOptions (opt_options)

This method sets the imprint options. If the argument opt_options is not defined, then all values are reset to defaults.

getCopyrights () : {string}

This method retrieves the copyright string for the current view of the map.

getStyle () : {CSSStyleDeclaration}

This method gets the CSS style declaration of the imprint DOM element.

addL11NString (tag, value)

Method adds "Terms of use" L11N string to the available collection.

addOnDisposeCallback (callback, opt_scope)

This method adds a callback which to be triggered when an object is disposed.

capture (canvas, pixelRatio, callback, opt_errback)

This method is used to capture the element view.

Class Description

This class encapsulates the brand, copyright and terms of use information displayed on the map.

Constructor Details

H.map.Imprint(map, opt_options)

Parameters:
 
map:
{H.Map}
 
The map object with which the imprint information is associated
opt_options:
{H.map.Imprint.Options=} [optional]
 
The configuration options for the imprint information

Method Details

setOptions (opt_options)

This method sets the imprint options. If the argument opt_options is not defined, then all values are reset to defaults.

Parameters:
 
opt_options:
{H.map.Imprint.Options=} [optional]
 
The options to style the imprint

getCopyrights () : {string}

This method retrieves the copyright string for the current view of the map.

Returns:
 
{string}
The copyright string for the current map view

getStyle () : {CSSStyleDeclaration}

This method gets the CSS style declaration of the imprint DOM element.

Returns:
 
{CSSStyleDeclaration}
An object containing the style details for the DOM element holding the imprint information.

addL11NString (tag, value)

Method adds "Terms of use" L11N string to the available collection.

Parameters:
 
tag:
{string}
 
IETF language tag
value:
{string}
 
localisation string

addOnDisposeCallback (callback, opt_scope)

This method adds a callback which to be triggered when an object is disposed.

Parameters:
 
callback:
{!Function}
 
A callback function to add
opt_scope:
{Object=} [optional]
 
An object representing the scope

capture (canvas, pixelRatio, callback, opt_errback)

This method is used to capture the element view.

Parameters:
 
canvas:
{HTMLCanvasElement}
 
The HTML Canvas element to draw the view of the capturable element
pixelRatio:
{number}
 
The pixel ratio to use for over-sampling for high-resolution displays, the default is 1
callback:
{function(HTMLCanvasElement=)}
 
A callback function to call once the result of capture is ready
opt_errback:
{function(string)=} [optional]
 
A callback function to call if error occurred during capture