Constructor
new Layer(nameopt, optionsopt)
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | String | <optional> | "noname" | Layer name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options | Object | <optional> | Layer options: Properties
|
- Source
- EventsHandler
#event:visibilitychange - EventsHandler
#event:add - EventsHandler
#event:remove - EventsHandler
#event:mousemove - EventsHandler
#event:mouseenter - EventsHandler
#event:mouseleave - EventsHandler
#event:lclick - EventsHandler
#event:rclick - EventsHandler
#event:mclick - EventsHandler
#event:ldblclick - EventsHandler
#event:rdblclick - EventsHandler
#event:mdblclick - EventsHandler
#event:lup - EventsHandler
#event:rup - EventsHandler
#event:mup - EventsHandler
#event:ldown - EventsHandler
#event:rdown - EventsHandler
#event:mdown - EventsHandler
#event:lhold - EventsHandler
#event:rhold - EventsHandler
#event:mhold - EventsHandler
#event:mousewheel - EventsHandler
#event:touchmove - EventsHandler
#event:touchstart - EventsHandler
#event:touchend - EventsHandler
#event:doubletouch
Members
_id
- Source
(protected) _pickingColor :Vec3
Layer picking color. Assign when added to the planet.
- Source
planet
Returns planet instance.
- Source
Methods
(abstract, protected) _assignPlanet(planet)
Assign the planet.
Name | Type | Description |
---|---|---|
planet | Planet | Planet render node. |
- Source
(abstract, protected) _bindPicking()
Assign picking color to the layer.
- Source
(protected) _correctFullExtent()
Special correction of the whole globe extent.
- Source
addTo(planet)
Adds layer to the planet.
Name | Type | Description |
---|---|---|
planet | Planet | Adds layer to the planet. |
- Source
bringToFront()
Set zIndex to the maximal value depend on other layers on the planet.
- Source
(abstract) clear()
Clears layer material.
- Source
flyExtent()
Fly extent.
- Source
getAttribution() → {string}
Gets layer attribution.
- Source
Layer attribution
- Type:
- string
getExtent() → {Extent}
Gets layer extent.
- Source
- Layer geodetic extent.
- Type:
- Extent
getExtentMerc() → {Extent}
Gets layer web-mercator extent.
- Source
- Layer extent.
- Type:
- Extent
getHeight() → {number}
Gets layer height.
- Source
- Type:
- number
getID() → {string}
Gets layer identifier.
- Source
- Layer object id.
- Type:
- string
getVisibility() → {boolean}
Gets layer visibility.
- Source
- Layer visibility.
- Type:
- boolean
getZIndex() → {number}
Gets z-index.
- Source
- Type:
- number
(abstract) hasImageryTiles() → {boolean}
Returns true if a layer has imagery tiles.
- Source
- Imagery tiles flag.
- Type:
- boolean
isBaseLayer() → {boolean}
Returns true if the layer is a base.
- Source
- Base layer flag.
- Type:
- boolean
isEqual(layer) → {boolean}
Compares layers instances.
Name | Type | Description |
---|---|---|
layer | Layer | Layer instance to compare. |
- Source
- Returns true if the layers is the same instance of the input.
- Type:
- boolean
remove() → {Layer}
Removes from planet.
- Source
-This layer.
- Type:
- Layer
setAttribution(html)
Sets layer attribution text.
Name | Type | Description |
---|---|---|
html | string | HTML code that represents layer attribution, it could be just a text. |
- Source
setBaseLayer(isBaseLayer)
Sets base layer type true.
Name | Type | Description |
---|---|---|
isBaseLayer | boolean |
- Source
setExtent(extent)
Sets visible geographical extent.
Name | Type | Description |
---|---|---|
extent | Extent | Layer visible geographical extent. |
- Source
setHeight(height)
Sets height over the ground.
Name | Type | Description |
---|---|---|
height | number | Layer height. |
- Source
(abstract) setVisibility(visibility)
Sets layer visibility.
Name | Type | Description |
---|---|---|
visibility | boolean | Layer visibility. |
- Source
setZIndex(zIndex)
Sets z-index.
Name | Type | Description |
---|---|---|
zIndex | number | Layer z-index. |
- Source
viewExtent()
View extent.
- Source