use of org.osmdroid.bonuspack.overlays.GroundOverlay in project android-sdk-examples by IndoorAtlas.
the class OpenStreetMapOverlay method setupGroundOverlay.
/**
* Sets bitmap of floor plan as ground overlay on Open Street Map
*/
private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) {
if (mGroundOverlay != null) {
mOsmv.getOverlays().remove(mGroundOverlay);
}
if (mOsmv != null) {
IALatLng iaLatLng = floorPlan.getCenter();
GroundOverlay overlay = new GroundOverlay();
overlay.setImage(new BitmapDrawable(getResources(), bitmap));
overlay.setPosition(new GeoPoint(iaLatLng.latitude, iaLatLng.longitude));
overlay.setDimensions(floorPlan.getWidthMeters(), floorPlan.getHeightMeters());
overlay.setBearing(floorPlan.getBearing());
mGroundOverlay = overlay;
mOsmv.getOverlays().add(mGroundOverlay);
}
}
Aggregations