Constructor
new MapState(optionsopt, startupFeaturesopt)
Creating the map state
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
|
- Source:
Fires:
zoomIn()
Zoom in
- Source:
zoomOut()
Zoom out
- Source:
zoomToInitialExtent()
Zoom to initial extent
- Source: