On Feb 10, 8:25 am, igloo <[email protected]> wrote:
> You are declaring bounds inside your for (markers....) loop.
> Initialize it outside the loop and all your markers will be added to
> it rather than just the last one!

     function zoommap() {
        var bounds=new GLatLngBounds(); //this line fixes almost
everything*
        for (var i=0; i<gmarkers.length; i++) {
          if (!gmarkers[i].isHidden()) {


also,
var point = new GLatLng(gmarkers[i].mylat,gmarkers[i].mylng);
could be:
var point = new GLatLng(gmarkers[i].getGLatLng());

unless you have some other reason for adding the mylat and mylng
properties to a marker (they are available as gmarkers[i].getGLatLng
().lat() & gmarkers[i].getLatLng().lng()).

  -- Larry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to