new Layer(name, options)
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | "noname" | optional Layer name. | ||||||||||||||||||||||||||||||||||||||||
options |
Object |
optional
Layer options:
|
Fires:
- visibilitychange - Triggered when layer visibilty chanched.
- add - Triggered when layer has added to the planet.
- remove - Triggered when layer has removed from the planet.
- mousemove
- mouseenter
- mouseleave
- lclick
- rclick
- mclick
- ldblclick
- rdblclick
- mdblclick
- lup
- rup
- mup
- ldown
- rdown
- mdown
- lhold
- rhold
- mhold
- mousewheel
- touchmove
- touchstart
- touchend
- doubletouch
Members
-
static,constantmodule:og/layer/Layer~Layer.MAX_REQUESTSnumber
-
Maximum loading queries at one time.
-
protected_attributionstring
-
Layer attribution.
-
protected_extentExtent
-
Visible degrees extent.
-
protected_extentMercExtent
-
Visible mercator extent.
-
protected_heightnumber
-
Height over the ground.
-
protected_idnumber
-
Unic identifier.
-
protected_isBaseLayerboolean
-
Base layer type flag.
-
_opacitynumber
-
Layer global opacity.
-
protected_pickingColorVec3
-
Layer picking color. Assign when added to the planet.
-
protected_planetPlanet
-
Planet node.
-
protected_visibilityboolean
-
Layer visibility.
-
protected_zIndexnumber
-
Layer z-index.
-
eventsEvents
-
Events handler.
-
maxZoomnumber
-
Maximal zoom level when layer is visibile.
-
minZoomnumber
-
Minimal zoom level when layer is visibile.
-
namestring
-
Layer user name.
-
abstractplanet
-
Returns planet instance.
Methods
-
abstract,protected_assignPlanet(planet)
-
Assign the planet.
Name Type Description planet
Planet Planet render node. -
abstract,protected_bindPicking()
-
Assign picking color to the layer.
-
protected_correctFullExtent()
-
Special correction of the whole globe extent.
-
addTo(planet)
-
Adds layer to the planet.
Name Type Description planet
Planet Adds layer to the planet. -
bringToFront()
-
Set zIndex to the maximal value depend on other layers on the planet.
-
abstractclear()
-
Clears layer material.
-
getExtent(){Extent}
-
Gets layer extent.
Returns:
Type Description Extent - Layer geodetic extent. -
getHeight(){number}
-
Gets layer height.
Returns:
Type Description number - -
getID(){string}
-
Gets layer identifier.
Returns:
Type Description string - Layer object id. -
getVisibility(){boolean}
-
Gets layer visibility.
Returns:
Type Description boolean - Layer visibility. -
getZIndex(){number}
-
Gets z-index.
Returns:
Type Description number - -
abstracthasImageryTiles(){boolean}
-
Returns true if a layer has imagery tiles.
Returns:
Type Description boolean - Imagery tiles flag. -
isBaseLayer(){boolean}
-
Returns true if the layer is a base.
Returns:
Type Description boolean - Base layer flag. -
isEqual(layer){boolean}
-
Compares layers instances.
Name Type Description layer
Layer Layer instance to compare. Returns:
Type Description boolean - Returns true if the layers is the same instance of the input. -
remove(){Layer}
-
Removes from planet.
Returns:
Type Description Layer -This layer. -
setAttribution(html)
-
Sets layer attribution text.
Name Type Description html
string HTML code that represents layer attribution, it could be just a text. -
setBaseLayer(flag)
-
Sets base layer type true.
Name Type Description flag
boolean Base layer flag. -
setExtent(extent)
-
Sets visible geographical extent.
Name Type Description extent
Extent Layer visible geographical extent. -
setHeight(height)
-
Sets height over the ground.
Name Type Description height
number Layer height. -
abstractsetVisibility(visibility)
-
Sets layer visibility.
Name Type Description visibility
boolean Layer visibility. -
setZIndex(zIndex)
-
Sets z-index.
Name Type Description zIndex
number Layer z-index.