Global

Members

(constant) FeatureSnapType :string

Enum for snap type

Type:
  • string
Properties:
Name Type Description
NO_SNAP string

no snap selected

VERTEX string

snap to vertex and lines

INTERSECTION string

snap to intersection

Source:

(constant) base64png :string

The started base 64 string for PNG image

Type:
  • string
Source:

(constant) base64pngNullData :string

The base 64 string for transparent PNG image

Type:
  • string
Source:

(constant) base64svg :string

The started base 64 string for SVG image

Type:
  • string
Source:

(constant) base64svgLineLayer :string

The base 64 string for https://raw.githubusercontent.com/qgis/QGIS/master/images/themes/default/mIconLineLayer.svg SVG image

Type:
  • string
Source:

(constant) base64svgOlLayer :string

The base 64 string for https://openlayers.org/theme/img/logo-dark.svg SVG image

Type:
  • string
Source:

(constant) base64svgPointLayer :string

The base 64 string for https://raw.githubusercontent.com/qgis/QGIS/master/images/themes/default/mIconPointLayer.svg SVG image

Type:
  • string
Source:

(constant) base64svgPolygonLayer :string

The base 64 string for https://raw.githubusercontent.com/qgis/QGIS/master/images/themes/default/mIconPolygonLayer.svg SVG image

Type:
  • string
Source:

(constant) base64svgRasterLayer :string

The base 64 string for https://raw.githubusercontent.com/qgis/QGIS/master/images/themes/default/mIconRasterLayer.svg SVG image

Type:
  • string
Source:

intersectionSvg :TemplateResult

Returns the icon to display when the snap on intersections is active

Type:
  • TemplateResult
Source:

layer :ImageLayer.<ImageWMS>

Get the single WMS layer instance

Type:
  • ImageLayer.<ImageWMS>
Source:

noSnapSvg :TemplateResult

Return the default no-snap svg icon

Type:
  • TemplateResult
Source:

snapActive :boolean

Snap active

Type:
  • boolean
Source:

snapActive

Activate/deactivate snap

Source:
Fires:

snapSelected :FeatureSnapType

The current snap type

Type:
Source:

snapSelected

Setting the current snap type

Source:

vertexSvg :TemplateResult

Returns the icon to display when the snap on vertex is active

Type:
  • TemplateResult
Source:

Methods

_selectSnap(snap) → {void}

Updates the selected snap type

Parameters:
Name Type Description
snap FeatureSnapType

the snap type

Source:
Returns:
Type
void

addListener(listener, supportedEvents)

add a listener that will be called for one or several given events

Parameters:
Name Type Description
listener EventListener

Callback

supportedEvents Array.<string> | string

events on which the listener will be called. if undefined or "*", it will be called for any events

Source:

checkInvalidLayersCfgFile()

Display a message about invalid layers, detected on the client side.

A message is logged in the console in English. Another message is translated and displayed for GIS administrators.

Source:

dispatch(event)

Call listeners associated with the given event

Parameters:
Name Type Description
event EventToDispatch | string

an event name, or an object with a 'type' property having the event name. In this case other properties are parameters for listeners.

Source:

displayWarningsAdministrator()

Display messages to the administrator about deprecated features or outdated versions.

The message is translated and displayed for GIS administrators. A message is logged in the console in English.

Source:

emitUpdateEvent() → {void}

Activate/deactivate snap

Source:
Fires:
  • SnapSelector#event:domSnapSelectorUpdate
Returns:
Type
void

getSelectedSnapIcon() → {TemplateResult}

Return the svg icon based on the selected snap

Source:
Returns:
  • the svg icon
Type
TemplateResult

removeListener(listenerToRemove, supportedEvents)

remove a listener that is associated for one or several given events

Parameters:
Name Type Description
listenerToRemove EventListener

Callback

supportedEvents Array.<string> | string

list of events from which the listener will be removed. if undefined or "*", it will be removed from any events

Source:

renderTemplate() → {RootPart}

Renders the main template

Source:
Returns:
  • the component template
Type
RootPart

subscribe(listener, events)

Subscribe to events. This method is very similar to addListener, but it can also notify listeners even if they were defined after the event was emitted. It always emits the last event registered for the specific event type. Does not supports wildcard events

Parameters:
Name Type Description
listener EventListener

Callback

events Array.<string> | string

events on which the listener will be called. if undefined or "*", it will be called for any events

Source:

toggleSnapSelected(event) → {void}

Listener for the snap activation/deactivation

Parameters:
Name Type Description
event Event

click event on main snap button

Source:
Returns:
Type
void

Type Definitions

EventDispatched

The lizmap event object dispatched to listeners

Type:
Properties:
Name Type Description
type string

Event type, the event name to listen to, example : "edition.layer.modified"

__eventid__ string

Immutable event unique id (used to avoid infinite loop when event is propagated to other dispatchers)

target EventDispatcher

Immutable event first dispatcher (used to identify the event source when event is propagated to other dispatchers)

Source:

EventListener(event)

The lizmap event listener callback

Parameters:
Name Type Description
event EventDispatched

The event object dispatched to listeners

Source:

EventToDispatch

The lizmap event object to dispatch to listeners

Type:
  • object
Properties:
Name Type Description
type string

Event type, the event name to listen to, example : "edition.layer.modified"

Source:

lizDict

LizDict

Type:
  • object
Properties:
Name Type Description
string object

All strings translated in user interface

Source:

Events

beforetreecreated

Event when the tree is going to be created

Source:

domSnapSelectorUpdate

Properties:
Name Type Description
active boolean

whether snap is active or not

snapSelected FeatureSnapType

The type of snap

Source:

layersadded

Event when layers have been added

Source:

lizmapSnapSelectorUpdate

Properties:
Name Type Description
type string

lizmap-snap-selector-update

active boolean

whether snap is active or not

snapSelected FeatureSnapType

The type of snap

Source:

lizmapSnapSelectorUpdate

Properties:
Name Type Description
type string

lizmap-snap-selector-update

active boolean

whether snap is active or not

snapSelected FeatureSnapType

The type of snap

Source:

mapcreated

Event when the map has been created keep this legacy event for backwards compatibility purpose

Source: