/** * Creates a new Ground Overlay * * @param imageUrl url of the ground overlay image * @param latLonBox bounds of the image * @param drawOrder z index of the image * @param visibility true if visible, false otherwise * @param properties properties hashmap * @param rotation rotation of image */ /* package */ KmlGroundOverlay(String imageUrl, LatLngBounds latLonBox, float drawOrder, int visibility, HashMap<String, String> properties, float rotation) { mGroundOverlayOptions = new GroundOverlayOptions(); mImageUrl = imageUrl; mProperties = properties; if (latLonBox == null) { throw new IllegalArgumentException("No LatLonBox given"); } mLatLngBox = latLonBox; mGroundOverlayOptions.positionFromBounds(latLonBox); mGroundOverlayOptions.bearing(rotation); mGroundOverlayOptions.zIndex(drawOrder); mGroundOverlayOptions.visible(visibility != 0); }
public void addOverlay(LatLng place) { GroundOverlay groundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions() .position(place, 100) .transparency(0.5f) .zIndex(3) .image(BitmapDescriptorFactory.fromBitmap(drawableToBitmap(getDrawable(R.drawable.map_overlay))))); startOverlayAnimation(groundOverlay); }
public GroundOverlayOptions zIndex(float zIndex) { real.zIndex(zIndex); return this; } }
/** * Creates a new Ground Overlay * * @param imageUrl url of the ground overlay image * @param latLonBox bounds of the image * @param drawOrder z index of the image * @param visibility true if visible, false otherwise * @param properties properties hashmap * @param rotation rotation of image */ /* package */ KmlGroundOverlay(String imageUrl, LatLngBounds latLonBox, float drawOrder, int visibility, HashMap<String, String> properties, float rotation) { mGroundOverlayOptions = new GroundOverlayOptions(); mImageUrl = imageUrl; mProperties = properties; if (latLonBox == null) { throw new IllegalArgumentException("No LatLonBox given"); } mLatLngBox = latLonBox; mGroundOverlayOptions.positionFromBounds(latLonBox); mGroundOverlayOptions.bearing(rotation); mGroundOverlayOptions.zIndex(drawOrder); mGroundOverlayOptions.visible(visibility != 0); }
public void addOverlay(LatLng place) { GroundOverlay groundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions() .position(place, 100) .transparency(0.5f) .zIndex(3) .image(BitmapDescriptorFactory.fromBitmap(drawableToBitmap(getActivity().getResources().getDrawable(R.drawable.map_overlay))))); startOverlayAnimation(groundOverlay); }
/** * Sets bitmap of floor plan as ground overlay on Google Maps */ private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) { if (mGroundOverlay != null) { mGroundOverlay.remove(); } if (mMap != null) { BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); IALatLng iaLatLng = floorPlan.getCenter(); LatLng center = new LatLng(iaLatLng.latitude, iaLatLng.longitude); GroundOverlayOptions fpOverlay = new GroundOverlayOptions() .image(bitmapDescriptor) .zIndex(0.0f) .position(center, floorPlan.getWidthMeters(), floorPlan.getHeightMeters()) .bearing(floorPlan.getBearing()); mGroundOverlay = mMap.addGroundOverlay(fpOverlay); } }
/** * Sets bitmap of floor plan as ground overlay on Google Maps */ private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) { if (mGroundOverlay != null) { mGroundOverlay.remove(); } if (mMap != null) { BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); IALatLng iaLatLng = floorPlan.getCenter(); LatLng center = new LatLng(iaLatLng.latitude, iaLatLng.longitude); GroundOverlayOptions fpOverlay = new GroundOverlayOptions() .image(bitmapDescriptor) .zIndex(0.0f) .position(center, floorPlan.getWidthMeters(), floorPlan.getHeightMeters()) .bearing(floorPlan.getBearing()); mGroundOverlay = mMap.addGroundOverlay(fpOverlay); } }