Class: MapState

MapState.MapState(optionsopt, startupFeaturesopt)

Class representing the lizmap Map State

Constructor

new MapState(optionsopt, startupFeaturesopt)

Create a lizmap Map State instance

Parameters:
Name Type Attributes Description
options OptionsConfig <optional>

main configuration options

startupFeatures string | undefined <optional>

The features to highlight at startup in GeoJSON

Source:

Extends

Members

center :Array.<number>

Map center

Type:
  • Array.<number>
Source:

extent :Extent

Map extent (calculate by the map view)

Type:
  • Extent
Source:

initialExtent :Extent

Map initial extent (provided by lizmap config)

Type:
  • Extent
Source:

isReady :boolean

Map is ready

Type:
  • boolean
Source:

maxZoom :number

Map max zoom

Type:
  • number
Source:

minZoom :number

Map min zoom

Type:
  • number
Source:

pointResolution :number

Map resolution (calculate from the center)

Type:
  • number
Source:

pointScaleDenominator :number

Map scale denominator (calculate from the center)

Type:
  • number
Source:

projection :string

Map projection code

Type:
  • string
Source:

resolution :number

Map resolution

Type:
  • number
Source:

scaleDenominator :number

Map scale denominator

Type:
  • number
Source:

scales :Array.<number>

Map scales

Type:
  • Array.<number>
Source:

singleWMSLayer :boolean

Config singleWMSLayer

Type:
  • boolean
Source:

size :Array.<number>

Map size

Type:
  • Array.<number>
Source:

startupFeatures :string|undefined

The features to highlight at startup in GeoJSON

Type:
  • string | undefined
Source:

zoom :number

Map zoom

Type:
  • number
Source:

Methods

update(evt)

Update the map state

Parameters:
Name Type Description
evt object

the map state changed object

Properties
Name Type Attributes Description
projection string <optional>

the map projection code

center Array.<number> <optional>

the map center

zoom number <optional>

the map zoom

size Array.<number> <optional>

the map size

extent Array.<number> <optional>

the map extent (calculate by the map view)

resolution number <optional>

the map resolution

scaleDenominator number <optional>

the map scale denominator

pointResolution number <optional>

the map resolution (calculate from the center)

pointScaleDenominator number <optional>

the map scale denominator (calculate from the center)

Source:
Fires:

zoomIn()

Zoom in

Source:

zoomOut()

Zoom out

Source:

zoomToInitialExtent()

Zoom to initial extent

Source: