parambyte wrote:
> hello. i am not a coder, and design simple sites using Adobe GoLive or
> Adobe Dreamweaver. I am making a small site for a chartered airplane
> service and I want to offer site viewers the option to see the radius
> covered by their few airplanes on a google map.
>
> how do I do it?
>
> here is an example I found but dont know how to use it.
> http://www.freemaptools.com/radius-around-point.html
>
> there are fixed radii for he aircraft, which i can make as a drop down
> menu. you select an aircraft and it displays a radius and you can zoom
> in and out of the map to see where all the plane can fly.
>
> i would love some help and advice on how to do this...
Add the following code to your map:
function drawCircle(lat, lng, radius, strokeColor, strokeWidth,
strokeOpacity, fillColor, fillOpacity) {
var d2r = Math.PI/180;
var r2d = 180/Math.PI;
var Clat = radius * 0.014483;
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);
}
And then call the function like this:
drawCircle(53.479874, -2.246704, 10.0, "#000080",
1, 0.75, "#0000FF", .5);
http://gmaps-samples.googlecode.com/svn/trunk/basic_wcircle/basicw_circle.htm
Hope this helps,
--
Bart
Commercial Map services available - email bart-at-dotinternet.be
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---