use of com.google.android.gms.maps.model.GroundOverlay in project android-maps-utils by googlemaps.
the class KmlRenderer method addGroundOverlayToMap.
/**
* Adds ground overlays from a given URL onto the map
*
* @param groundOverlayUrl url of ground overlay
* @param groundOverlays hashmap of ground overlays to add to the map
*/
private void addGroundOverlayToMap(String groundOverlayUrl, HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, boolean containerVisibility) {
BitmapDescriptor groundOverlayBitmap = BitmapDescriptorFactory.fromBitmap(getImagesCache().get(groundOverlayUrl));
for (KmlGroundOverlay kmlGroundOverlay : groundOverlays.keySet()) {
if (kmlGroundOverlay.getImageUrl().equals(groundOverlayUrl)) {
GroundOverlayOptions groundOverlayOptions = kmlGroundOverlay.getGroundOverlayOptions().image(groundOverlayBitmap);
GroundOverlay mapGroundOverlay = attachGroundOverlay(groundOverlayOptions);
if (!containerVisibility) {
mapGroundOverlay.setVisible(false);
}
groundOverlays.put(kmlGroundOverlay, mapGroundOverlay);
}
}
}
Aggregations