Created
July 14, 2011 08:18
-
-
Save josefadamcik/1082091 to your computer and use it in GitHub Desktop.
GMAP fit markers to view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var targetBounds, i, markerPositions; | |
markerPositions = ; //pole objektu google.mapsLatLng pro jdnotlive markery | |
targetBounds = new google.maps.LatLngBounds(); | |
for (i = 0; i < markerPositions.length; i++) { | |
targetBounds.extend(markerPositions[i]); | |
} | |
map.fitBounds(targetBounds); //map je objekt google.maps.Map |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment