MapLayer (API Reference)
Class MapLayer
Interface for managing a map layer.
A map layer can be created by using the MapLayerBuilder. At creation, the layer
gets added to a map. The layer gets removed from the map upon instance destruction.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Frees all internally used resources.voidsetEnabled(boolean enable) Sets whether or not the layer is enabled to be drawn.voidsetPriority(MapLayerPriority priority) Sets the render priority for the layer which replaces any previously defined priorities.voidSets the style to be used by the layer.
-
Method Details
-
setEnabled
public void setEnabled(boolean enable) Sets whether or not the layer is enabled to be drawn.
- Parameters:
enable-Trueto enable the layer,falseto disable it.
-
setStyle
Sets the style to be used by the layer. For more details see Custom Layer Style Reference in the documentation. Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
- Parameters:
style-Style for the layer.
-
setPriority
Sets the render priority for the layer which replaces any previously defined priorities.
- Parameters:
priority-Priority for the layer.
-
destroy
public void destroy()Frees all internally used resources. After calling this method, the object is not usable anymore.
-