-
-
Constructor Summary
Constructors Constructor Description KmlLayer(GoogleMap map, int resourceId, Context context)Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running. KmlLayer(GoogleMap map, InputStream stream, Context context)Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running. KmlLayer(GoogleMap map, int resourceId, Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, Renderer.ImagesCache cache)Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.Use this constructor with shared object managers in order to handle multiple layers withtheir own event handlers on the map. KmlLayer(GoogleMap map, InputStream stream, Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, Renderer.ImagesCache cache)Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.Use this constructor with shared object managers in order to handle multiple layers withtheir own event handlers on the map.
-
Method Summary
Modifier and Type Method Description voidaddLayerToMap()Adds the KML data to the map - must be called on the main UI thread booleanhasPlacemarks()Checks if the layer contains placemarks Iterable<KmlPlacemark>getPlacemarks()Gets an iterable of KmlPlacemark objects booleanhasContainers()Checks if the layer contains any KmlContainers Iterable<KmlContainer>getContainers()Gets an iterable of KmlContainerInterface objects Iterable<KmlGroundOverlay>getGroundOverlays()Gets an iterable of KmlGroundOverlay objects -
Methods inherited from class com.google.maps.android.data.Layer
getContainerFeature, getDefaultLineStringStyle, getDefaultPointStyle, getDefaultPolygonStyle, getFeature, getFeatures, getMap, isLayerOnMap, removeLayerFromMap, setMap, setOnFeatureClickListener -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
KmlLayer
KmlLayer(GoogleMap map, int resourceId, Context context)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.- Parameters:
map- GoogleMap objectresourceId- Raw resource KML or KMZ filecontext- The Context
-
KmlLayer
KmlLayer(GoogleMap map, InputStream stream, Context context)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.- Parameters:
map- GoogleMap objectstream- InputStream containing KML or KMZ filecontext- The Context
-
KmlLayer
KmlLayer(GoogleMap map, int resourceId, Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, Renderer.ImagesCache cache)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.Use this constructor with shared object managers in order to handle multiple layers withtheir own event handlers on the map.- Parameters:
map- GoogleMap objectresourceId- Raw resource KML or KMZ filecontext- The ContextmarkerManager- marker manager to create marker collection frompolygonManager- polygon manager to create polygon collection frompolylineManager- polyline manager to create polyline collection fromgroundOverlayManager- ground overlay manager to create ground overlay collection fromcache- cache to be used for fetched images
-
KmlLayer
KmlLayer(GoogleMap map, InputStream stream, Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, Renderer.ImagesCache cache)
Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.Constructor may be called on a background thread, as I/O and parsing may be long-running.Use this constructor with shared object managers in order to handle multiple layers withtheir own event handlers on the map.- Parameters:
map- GoogleMap objectstream- InputStream containing KML or KMZ filecontext- The ContextmarkerManager- marker manager to create marker collection frompolygonManager- polygon manager to create polygon collection frompolylineManager- polyline manager to create polyline collection fromgroundOverlayManager- ground overlay manager to create ground overlay collection fromcache- cache to be used for fetched images
-
-
Method Detail
-
addLayerToMap
void addLayerToMap()
Adds the KML data to the map - must be called on the main UI thread
-
hasPlacemarks
boolean hasPlacemarks()
Checks if the layer contains placemarks
-
getPlacemarks
Iterable<KmlPlacemark> getPlacemarks()
Gets an iterable of KmlPlacemark objects
-
hasContainers
boolean hasContainers()
Checks if the layer contains any KmlContainers
-
getContainers
Iterable<KmlContainer> getContainers()
Gets an iterable of KmlContainerInterface objects
-
getGroundOverlays
Iterable<KmlGroundOverlay> getGroundOverlays()
Gets an iterable of KmlGroundOverlay objects
-
-
-
-