I am trying to bring an array from a prj1.php page to map.php page
which contains all locations.The size of the array is 10 .

 my code is as follows:
var latt="<?php echo $_GET['Loca'];?>";
if(latt)
{
var locat= latt.split("%");
geocoder = new GClientGeocoder();
for(i=0;i<10;i++)
{
if (geocoder)
 {
       alert("hello" + locat[i]);
       address=locat[i];
        geocoder.getLatLng(address,function(point) {
          if (!point)
           {
                alert(address + " not found");
            }
        else
          {
               alert("point:" + point);
              // map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
            }
          }
        );
      }
  }
}

.............................xxxxxxxxxxx...............

While I am executing this, I see the markers only when I use  some
alert statements,otherwise if I remove them I do not see any markers
on the map.
Can any one help me why this is so ?
Is the geocode function reallly  slow or is the google map very slow
to mark ?

Is there any better way to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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