Package com.google.maps.android.data
Class Renderer
- java.lang.Object
-
- com.google.maps.android.data.Renderer
-
- Direct Known Subclasses:
GeoJsonRenderer
,KmlRenderer
public class Renderer extends java.lang.Object
An abstraction that shares the common properties ofKmlRenderer
andGeoJsonRenderer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Renderer.ImagesCache
-
Constructor Summary
Constructors Constructor Description Renderer(com.google.android.gms.maps.GoogleMap map, android.content.Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, Renderer.ImagesCache imagesCache)
Creates a new Renderer object for KML featuresRenderer(com.google.android.gms.maps.GoogleMap map, java.util.HashMap<? extends Feature,java.lang.Object> features, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager)
Creates a new Renderer object for GeoJSON features
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignStyleMap(java.util.HashMap<java.lang.String,java.lang.String> styleMap, java.util.HashMap<java.lang.String,KmlStyle> styles)
Iterates through a list of styles and assigns a stylejava.util.Set<Feature>
getFeatures()
Gets a set containing Featuresjava.util.HashMap<KmlGroundOverlay,com.google.android.gms.maps.model.GroundOverlay>
getGroundOverlayMap()
Gets the ground overlays on the current layercom.google.android.gms.maps.GoogleMap
getMap()
Gets the GoogleMap that Feature objects are being placed onjava.util.Collection<java.lang.Object>
getValues()
getValues is called to retrieve the values stored in the mFeatures hashmap.boolean
isLayerOnMap()
Checks if layer has been added to mapvoid
setMap(com.google.android.gms.maps.GoogleMap map)
Sets the map that objects are being placed on
-
-
-
Constructor Detail
-
Renderer
public Renderer(com.google.android.gms.maps.GoogleMap map, android.content.Context context, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager, @Nullable Renderer.ImagesCache imagesCache)
Creates a new Renderer object for KML features- Parameters:
map
- map to place objects oncontext
- 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 fromimagesCache
- an optional ImagesCache to be used for caching images fetched
-
Renderer
public Renderer(com.google.android.gms.maps.GoogleMap map, java.util.HashMap<? extends Feature,java.lang.Object> features, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager)
Creates a new Renderer object for GeoJSON features- Parameters:
map
- map to place objects onfeatures
- contains a hashmap of features and objects that will go on the mapmarkerManager
- 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 from
-
-
Method Detail
-
isLayerOnMap
public boolean isLayerOnMap()
Checks if layer has been added to map- Returns:
- true if layer is on map, false otherwise
-
getMap
public com.google.android.gms.maps.GoogleMap getMap()
Gets the GoogleMap that Feature objects are being placed on- Returns:
- GoogleMap
-
setMap
public void setMap(com.google.android.gms.maps.GoogleMap map)
Sets the map that objects are being placed on- Parameters:
map
- map to place all objects on
-
getFeatures
public java.util.Set<Feature> getFeatures()
Gets a set containing Features- Returns:
- set containing Features
-
getValues
public java.util.Collection<java.lang.Object> getValues()
getValues is called to retrieve the values stored in the mFeatures hashmap.- Returns:
- mFeatures.values() collection of values stored in mFeatures
-
getGroundOverlayMap
public java.util.HashMap<KmlGroundOverlay,com.google.android.gms.maps.model.GroundOverlay> getGroundOverlayMap()
Gets the ground overlays on the current layer- Returns:
- mGroundOverlayMap hashmap contains the ground overlays
-
assignStyleMap
public void assignStyleMap(java.util.HashMap<java.lang.String,java.lang.String> styleMap, java.util.HashMap<java.lang.String,KmlStyle> styles)
Iterates through a list of styles and assigns a style- Parameters:
styleMap
-styles
-
-
-