Hi,
I have a map named "map1", this shows various markers and clicking these markers causes an event.
To ensure I only load the markers that would be visible on the map, I need to know the bounds of the map (the user has the ability to zoom in and out, and move the map around, so I have to presume the bounds are variable).
I can't seem to work out how to retrieve the bounds of the google map...I have tried the following without success:
Code: Select all
var bounds = map1.getBounds();
or
var bounds = new google.maps.LatLngBounds(); - but this doesnt return my maps bounds....
Can you help please?
many thanks,
Andy.