-
Abhay Singh • June 13, 2023 at 7:08 am UTC
Hi,
The HERE Maps API for JavaScript provides an easy means of overlaying the region on the map with the bitmap image by using the H.map.Overlay object.
Now I want to implement similar functionality in an android app to overlay an image onto the
map by providing the bounding box coordinates and an image URL. Can someone guide me how to implement this?James Milleree • November 29, 2023 at 10:59 am UTCHi,
I was facing the same issue. Here is the solution that worked for me and I hope it will also help in your case.
Did you try Add a Ground Overlay? Well, you can use the GroundOverlay class to overlay an image on the map. You need to provide the bounding box coordinates, image URL, and other relevant properties.
For Example:LatLngBounds bounds = new LatLngBounds(
new LatLng(minLatitude, minLongitude), // South west corner
new LatLng(maxLatitude, maxLongitude) // North east corner
);GroundOverlayOptions overlayOptions = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromUrl(imageUrl))
.positionFromBounds(bounds);googleMap.addGroundOverlay(overlayOptions);
After doing that ensure that your app has the necessary permissions for accessing the internet if you are loading images from URLs.
Remember to replace placeholders like minLatitude, minLongitude, maxLatitude, maxLongitude, and imageUrl with your actual data.
Resource- Power Apps certification
Thanks
-
This reply was modified 1 day, 16 hours ago by
James Milleree.
-
This reply was modified 1 day, 16 hours ago by
You must be logged in to reply to this topic.