KmlLayer

open class KmlLayer : Layer

Document class allows for users to input their KML data and output it onto the map

Constructors

Link copied to clipboard
constructor(map: GoogleMap, resourceId: Int, context: Context)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.
constructor(map: GoogleMap, stream: InputStream, context: Context)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.
constructor(map: GoogleMap, @RawRes resourceId: Int, context: Context, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager, cache: Renderer.ImagesCache)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.
constructor(map: GoogleMap, stream: InputStream, context: Context, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager, cache: Renderer.ImagesCache)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.

Functions

Link copied to clipboard
open fun addLayerToMap()
Adds the KML data to the map - must be called on the main UI thread
Link copied to clipboard
open fun getContainerFeature(mapObject: Any): Feature
Link copied to clipboard
Gets an iterable of KmlContainerInterface objects
Link copied to clipboard
Gets the default style used to render GeoJsonLineStrings.
Link copied to clipboard
Gets the default style used to render GeoJsonPoints.
Link copied to clipboard
Gets the default style used to render GeoJsonPolygons.
Link copied to clipboard
open fun getFeature(mapObject: Any): Feature
Retrieves a corresponding Feature instance for the given Object Allows maps with multiple layers to determine which layer the Object belongs to.
Link copied to clipboard
open fun getFeatures(): Iterable<out Feature>
Gets an iterable of all Feature elements that have been added to the layer
Link copied to clipboard
Gets an iterable of KmlGroundOverlay objects
Link copied to clipboard
open fun getMap(): GoogleMap
Gets the map on which the layer is rendered
Link copied to clipboard
Gets an iterable of KmlPlacemark objects
Link copied to clipboard
Checks if the layer contains any KmlContainers
Link copied to clipboard
Checks if the layer contains placemarks
Link copied to clipboard
open fun isLayerOnMap(): Boolean
Checks if the current layer has been added to the map
Link copied to clipboard
Removes all the data from the map and clears all the stored placemarks
Link copied to clipboard
open fun setMap(map: GoogleMap)
Renders the layer on the given map.
Link copied to clipboard
Sets a single click listener for the entire GoogleMap object, that will be called with the corresponding Feature object when an object on the map (Polygon, Marker, Polyline) is clicked.