Hello,

i want to edit the radius of an excisting polygon. below you find te
funtion i use to add a polygon to the map. i already looked at
http://econym.googlepages.com/index.htm but didn't find the right
thing.

thanks

kind regards

Bas



<script>
        function drawCircle(lat, lng, radius, strokeColor, strokeWidth,
strokeOpacity, fillColor, fillOpacity) {
                map.clearOverlays();
                var d2r = Math.PI/180;
                var r2d = 180/Math.PI;
                var Clat = radius * 0.014483;  // Convert statute miles into 
degrees
latitude
                var Clng = Clat/Math.cos(lat*d2r);
                var Cpoints = [];
                for (var i=0; i < 33; i++) {
                        var theta = Math.PI * (i/16);
                        Cy = lat + (Clat * Math.sin(theta));
                        Cx = lng + (Clng * Math.cos(theta));
                        var P = new GPoint(Cx,Cy);
                        Cpoints.push(P);
                }
                var polygon = new GPolygon(Cpoints, strokeColor, strokeWidth,
strokeOpacity, fillColor, fillOpacity);
                map.addOverlay(polygon);
        }
</script>

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