Methods

(inner) changeEnd()

The changeEnd method assigned to the mapview [this] will be triggered by the Openlayers mapview.Map moveend event.

The method assigns the current zoom level (rounded to 2 decimal) as mapview.z before checking whether the lat, lng, z hooks (url parameter) should be updated.

(inner) decorate(mapview) → {mapview}

The mapview decorator method decorates the mapview object param as a typedef mapview object.

The mapview decorator may return the async mapviewPromise method which must be awaited if svgTemplates must be loaded or syncPlugins must be executed.

Parameters:
NameTypeDescription
mapviewobject

JSON params for a new mapview.

Properties
NameTypeAttributesDefaultDescription
mapview.hoststring<optional>
mapp.host

The host domain/path for queries.

mapview.localeobject

The locale defintion for the mapview.

locale.svgTemplatesObject<optional>

Object of template key and src values to be loaded as svg strings. locale.svg_templates is the legacy property.

locale.syncPluginsarray<optional>

An array plugins to be loaded in order.

Returns:

Decorated Mapview.

Type: 
mapview

(async, inner) mapviewPromise(mapview) → {Promise.<mapview>}

mapviewPromise is an async method which resolves to the mapview object. The method is returned from the mapview decorator if the creation of the mapview must be awaited in order to import and execute synchronous plugin methods or load svg_templates required for synchronous feature style render methods.

Parameters:
NameTypeDescription
mapviewobject
Properties
NameTypeAttributesDescription
mapview.localelocale

The locale defintion for the mapview.

locale.pluginsarray

Array of plugins to dynamically import.

locale.syncPluginsarray<optional>

Array of plugins [key] to be executed in sync.

locale.svgTemplatesarray<optional>

Array of svg_templates [objects] to be loaded.

Returns:

The async method resolves to the decorated mapview object.

Type: 
Promise.<mapview>