Ground Overlay
spyhunter99 edited this page Feb 18, 2018
·
1 revision
Added in version 6.0.0 of osmdroid, the Ground Overlay class lets you plot an image on the map if you know the lat/lon coordinates of the four corners of the image.
Satellite imagery, weather/radar, etc
This is pretty straightforward. Create the class, set the image and the points (upper left, lower right). The overlay will stretch and shrink the image as needed.
GroundOverlay2 overlay = new GroundOverlay2();
overlay.setTransparency(0.5f);
overlay.setImage(bitmap);
overlay.setPosition(new GeoPoint(50.0,-127.5), new GeoPoint( 21.0, -66.5));
mMapView.getOverlayManager().add(overlay);