Class: Provider

H.map.provider.Provider

new H.map.provider.Provider (opt_options)

A Provider defines an object which works as a database for the map. Providers can exists in different forms in that they can implement client-side object storage or they can request data from a remote service.

Name Type Description
opt_options H.map.provider.Provider.Options optional

An object containing configuration options

Extends

Members

max number

This property holds a value indicating the maximum zoom level at which the given provider can serve data. The value is set at construction time.

min number

This property holds a value indicating the minimum zoom level at which the given provider can serve data. The value is set at construction time.

uid string

This property holds the unique identifier for the provider instance. The value is generated at construction time.

uri string

This property holds the provider's unique resource identifier. If it is not provided at construction time, it defaults to provider's uid.

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

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.

getCopyrights (boundingBox, level)Array.<!H.map.ICopyright>

This method retrieves the copyrights for the provided content for a certain geographical area and zoom level.

Note: This function may be overridden by H.map.provider.Provider.Options getCopyrights property. The default implementation returns null.

Name Type Description
boundingBox H.geo.Rect

The rectangular area for which to retrieve the copyright information

level number

The zoom level for which to retrieve the copyright information

Returns:
Type Description
Array.<!H.map.ICopyright> A list of copyright information objects for the provided area and zoom level

getStyleInternal ()H.map.render.Style.<!Object>

This methods returns the style used to render the provider data.

Returns:
Type Description
H.map.render.Style.<!Object>

providesDomMarkers ()boolean

This method checks whether this provider will provide DomMarker map objects. A concrete implementation of Provider must override it if it will provide DomMarkers.

Returns:
Type Description
boolean A value indicating if the given provider provides DomMarkers (true) or not (false)

providesGeoJSON ()boolean

This method checks whether this provider will provide data in GeoJSON format. A concrete implementation of Provider must override it if it will provide GeoJSON data.

Returns:
Type Description
boolean A value indicating if the given provider provides GeoJSON data (true) or not (false)

providesMarkers ()boolean

This method checks whether this provider will provide Marker map objects. A concrete implementation of Provider must override it if it will provide Markers.

Returns:
Type Description
boolean A value indicating if the given provider provides Markers (true) or not (false)

providesOMV ()boolean

This method checks whether this provider will provide data in OMV format. A concrete implementation of Provider must override it if it will provide OMV data.

Returns:
Type Description
boolean A value indicating if the given provider provides OMV data (true) or not (false)

providesOverlays ()boolean

This method checks whether this provider will provide overlay map objects. A concrete implementation of Provider must override it if it will provide overlays.

Returns:
Type Description
boolean true if the provider provides overlays, otherwise false

providesRasters ()boolean

This method checks whether this provider will provide bitmap images as tiles. A concrete implementation of Provider must override it if it will provide raster tiles.

Returns:
Type Description
boolean A value indicating if the given provider provides raster tiles (true) or not (false)

providesSpatials ()boolean

This method checks whether this provider will provide spatial map objects. A concrete implementation of Provider must override it if it will provide Spatials.

Returns:
Type Description
boolean A value indicating whether the provider provides map objects (true) or not (false)

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

setStyleInternal (style, opt_suppressChangeEvent)

This method sets the style to be used to render the provider data.

Name Type Description
style H.map.render.Style.<!Object>

The style to use for rendering the provider data.

opt_suppressChangeEvent boolean optional

Flag to suppress firing of config change event.

Type Definitions

H.map.provider.Provider.Options Object

This object defines configuration options for a Provider instance.

Properties:
Name Type Argument Description
uri string <optional>

The provider's unique resource identifier which must not contain an underscore "_". If omitted, an auto-generated unique session ID is used. If a consistent ID across sessions is needed (for example for storing provider data), this property must be specified.

min number <optional>

The minimum supported zoom level, the default is 0

max number <optional>

The maximum supported zoom level, the default is 22

getCopyrights function <optional>

A function to replace the default implementation of H.map.provider.Provider#getCopyrights

engineType H.Map.EngineType <optional>

The engine type in use, it is used to return the proper format of the provider's default style. Default is H.Map.EngineType.WEBGL

Events

update

Event fired when this provider's data updates.

Type: