I'm working with the Google Maps API for the first time and I'm trying to append a simple image of a Building on top of my current map view.
However, I have no idea how to calculate the
bounds and the exact position of my overlay.
As you can see in the documentation the position of the ground overlay is done via
var imageBounds = new google.maps.LatLngBounds( new google.maps.LatLng(40.716216,-74.213393), new google.maps.LatLng(40.765641,-74.139235));
In my case I have no idea how to calculate those bounds. What are those values exactly? Why are there two seperate
LatLng positions needed?
I have a simple .png of a building that I want to layer on top of an exact position. I get this position by entering the destination in Google Maps and reading the
Lng values from the embed-code.
Is there a better way of doing this? Any ideas, tipps or tricks on how I could do this?
Or is it possible to calculate those
bounds when I know the center of the image-position and the dimesions of my image file? (My image is 50x50px and a .png)
Thank you for your help.
Kind Regards, Matt