In another approach, I believe MapServer wants you to define a bounding box for 
the circle by creating a line shape with the first point at the UL coordinate 
of that box and the second coordinate at the LR coordinate of the box. So you'd 
offset your center point .5 KM to create those points. You can add the 
resulting shape to the appropriate layer to draw it.

I'll check to make sure, but I think that will work.

Steve

From: [email protected] 
[mailto:[email protected]] On Behalf Of Dan Little
Sent: Thursday, December 17, 2009 3:54 PM
To: Helen Eskina; [email protected]
Subject: Re: [mapserver-users] How to draw a circle using MapScript?

Totally off the cuff....

$shape = ms_shapeObjFromWKT('POINT('+$x+' '+$y+')');
$shape = $shape->buffer($radius);

From: Helen Eskina <[email protected]>
To: [email protected]
Sent: Thu, December 17, 2009 3:50:20 PM
Subject: [mapserver-users] How to draw a circle using MapScript?
Hello List,

I want to be able to draw a circle dynamically using PHP MapScript. The circle 
is defined by the coordinates of the centre and the radius in kilometers. I 
realize that the circle is a polygon and I should probably calculate all 
points. What is the best way to do it?

I would really appreciate any help!

Thank you,
Helen

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to