Hello,
please, I need help:
I want to implement a beaming diagram using a polygon showing a
complete area which can be filled with a colour.

The following code implements a diagram (radiation pattern) which
shows much beaming lines (= 36 radius-lines in 10°-steps).

Now I want the diagram as filled area, no lines. is there a solution
to alter the following code? Thanks.


function drawDiagramm(point,radius,image,fill,azi){
    var zoom = map.getZoom();
    var centerPt = map.fromLatLngToDivPixel(point);
   // var radiusPt = map.fromLatLngToDivPixel(rpoint);
        var radiusPt = centerPt;
        rpt1 = radiusPt.x + radius;
        rpt2 = radiusPt.y + radius;
radiusPt = new GPoint(rpt1,rpt2)

        var circlePoints = Array();
    with (Math) {
        radius = floor(sqrt(pow((centerPt.x-radiusPt.x),2) + pow
((centerPt.y-radiusPt.y),2)));

            for (var a = -0 ; a < 10 ; a+=5 ) {
            var aRad = (azi - 88 - a)*(PI/180);
            var y = centerPt.y  + radius*1.95 * sin(aRad)
            var x = centerPt.x  + radius*1.95 * cos(aRad)
            var p = new GPoint(x,y);
                        var mypt = map.fromDivPixelToLatLng(p, zoom);
            circlePoints.push(mypt);
            circlePoints.push(point);
                        if(image != "")
                        {
                        var mark = createMapMarker(point,image);
                        map.addOverlay(mark);
                        }
            }
                if(fill != "")
                {
                circleLine = new GPolygon
(circlePoints,color="#FF0000",line="1",0.5,0.5);
        }
        else
        {
        circleLine = new GPolygon
(circlePoints,color="#FF0000",line="1",0.30);
        }

                map.addOverlay(circleLine);
    }

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