MSIE will choke on that because of the trailing comma. When you use this
syntax

  var pts = [pt1,pt2,pt3,]

most browsers will treat that as an array with three elements, but MSIE
treats it like [pt1,pt2,pt3,null], which is then not valid as the first
parameter of GPolygon.


You can either add some complicated logic to drop the final "," or you
could create an empty array and .push() each element into it. Something
like this:

// create a polygon
var pts = new Array()";
  <?
    while ($rowX = mysql_fetch_object($resultX)){
      $lat = $rowX->lat;
      $lng = $rowX->lng;

      echo "pts.push(new GLatLng("."$lat,"."$lng"."));";
    }
  ?>
var polygon = new GPolygon(pts, null, 5, 0.7, "#81BE40", 0.0,
{clickable:true} );

map.addOverlay(polygon);

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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