new MapZone( [options])
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Control options. Properties
|
Fires:
- event:select
Extends
Members
-
<static> zones
-
Pre-defined zones
Methods
-
addZone(z, title, extent, map [, layer])
-
Add a new zone to the control
Parameters:
Name Type Argument Description z
Object title
string extent
ol.extent if map is not defined
map
ol.Map if map is defined use the map extent
layer
ol.layer.Layer <optional>
layer of the zone, default use default control layer
-
getCollapsed()
-
Get control collapsed
Returns:
- Type
- boolean
-
getLength()
-
Get nb zone
-
getMaps()
-
Get associated maps
Returns:
- Type
- ol.Map
-
removeZone(index)
-
Remove a zone from the control
Parameters:
Name Type Description index
number -
setCollapsed(b)
-
Collapse the control
Parameters:
Name Type Description b
boolean -
setVisible(b)
-
Show the control
Parameters:
Name Type Description b
boolean