Layer is an interface to get access to the layer data model.
In addition to the classes, a factory is available to help for creating
layer. Once the layer is created, the client can handle it by the use of its interface.
- See:
Methods
-
getGlobe()
-
Returns the globe.
Returns:
- Type
- Globe
-
getID()
-
Returns the identifier.
Returns:
- Type
- string
-
getName()
-
Returns the layer's name.
Returns:
- Type
- string
-
getAttribution()
-
Returns the attribution
Returns:
- Type
- string
-
getCopyrightUrl()
-
Returns the copyright URL
Returns:
- Type
- string
-
getAck()
-
Returns the acknowledgement.
Returns:
- Type
- string
-
getIcon()
-
Returns the icon's url.
By default, a default image is returned.Returns:
- Type
- string
-
getDescription()
-
Returns the layer description.
Returns:
- Type
- string
-
isVisible()
-
Check whether the layer is visible.
Returns:
- Type
- boolean
-
setVisible(arg)
-
Sets visible the layer.
Parameters:
Name Type Description arg
Boolean True when the layer is displayed on the globe otherwise false Fires:
Throws:
-
Will throw an error when arg is not a boolean
- Type
- TypeError
-
-
getOpacity()
-
Returns the opacity.
Returns:
A value between [0..1]- Type
- float
-
setOpacity(arg)
-
Sets the opacity.
Parameters:
Name Type Description arg
float A value between [0..1], 0 is transparent Fires:
Throws:
-
Will throw an error when arg is not a number in [0..1]
- Type
- TypeError
-
-
getProperties()
-
Returns the properties.
Returns:
properties- Type
- Object
-
getType()
-
Returns the type of layer
Returns:
- Type
- string
-
isPickable()
-
Checks whether the layer is pickable
Returns:
- Type
- boolean
-
isType(type)
-
Check the type of the layer
Parameters:
Name Type Description type
String Type to check Returns:
Result- Type
- boolean
-
getServices()
-
Returns the services related to the layer
Returns:
- Type
- Array.<string>
-
getDataType()
-
Returns the data type for vector layers.
Returns:
- Type
- GEOMETRY
-
getFormat()
-
Returns the format for raster layer
Returns:
the format- Type
- string
-
getCoordinateSystem()
-
Returns the coordinate reference system of the layer.
Returns:
the coordinate reference system of the layer- Type
- Crs
-
getBaseURl()
-
Returns the base URL
Returns:
the base URL- Type
- string
-
isDeletable()
-
Returns true when the layer is deletable by the client
Returns:
true when the layer is deletable by the client otherwise false- Type
- boolean
-
getColor()
-
Returns the layer's color
Returns:
color in rgba- Type
- Array.<int>
-
getStyle()
-
Returns the style.
Returns:
the style- Type
- FeatureStyle
-
getAvailableServices()
-
Returns the available services related to the layer.
Returns:
the available services- Type
- Array.<Object>
-
isBackground()
-
Returns true when the layer is set as background otherwise false.
-
<protected> _attach(g)
-
Attachs the raster layer to the planet.
Parameters:
Name Type Description g
Globe globe -
<protected> _detach()
-
Detaches the vector layer from the planet.