Hi!
The following code adds a part of a circle-line (width is 10°) which
is only visible in the direction of a given azimuth. Now I want to
fill the sector (from the central point to the part of circle-line)
with a colour. But this isn't possible yet, because "fill" needs the
complete circle-line (360°). Is there a solution for this problem?

If not, how can I realize a coloured line or more coloured lines
(radius-line) which is/are shown in the direction of the given
azimuth. Such as nodes or beams.
Can you help me please?


function drawDiagramm(point,radius,color,line,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 = -5 ; a < 10 ; a+=5 ) {
            var aRad = (azi - 90 - a)*(PI/180);
            var y = centerPt.y  + radius * sin(aRad);
            var x = centerPt.x  + radius * cos(aRad);
            var p = new GPoint(x,y);
            var mypt = map.fromDivPixelToLatLng(p, zoom);

            circlePoints.push(mypt);

                        if(image != "")
                        {
                        var mark = createMapMarker(mypt,image);
                        map.addOverlay(mark);
                        }
            }
                if(fill != "")
                {
                circleLine = new GPolygon(circlePoints,color,line,
0.5,fill,0.5);
        }
        else
        {
        circleLine = new GPolygon(circlePoints,color,line,0.8);
        }

                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