Hello everyone,

I have added DrawFeature control to my map.
Whenever it is activated it will always draw a polygon of sides 40 i.e. an
approx circle.
This is its code:

*            polyOptions = {sides: 40, radius: rad, angle: 0};
            polygonControl = new
OpenLayers.Control.DrawFeature(polygonLayer,

OpenLayers.Handler.RegularPolygon,
                                            {handlerOptions: polyOptions,
featureAdded:circleAdded});*
*            map.addControl(polygonControl);

*Now the problem is that the circleAdded function is not called when a
circle is drawn on map.

It is only called when I draw a circle by first clicking on map and then
dragging the drawn circle.
When I release the mouse 4 things happen:
1) Circle is already drawn when i pressed the mouse.
2) Circle is added to the polygonLayer.
3) circleAdded function is called.
4) All the circles that were created before (by just clicking and not click
+ drag) dissappear from the map screen.

I don't understand how to solve this problem.... Is it a problem with
openlayers itself or what?

What shall I do if I need such king of functionality.........
Please provide me with guidance...

Thank you in advance...........

I am attaching the source code with this post. The file name is
"polygons.html".

-- 
Regards,
Jatin Ambasana
iWork Technologies Pvt. Ltd.
Mobile:+91-9765394718
Mail:  [email protected]
Visit us: www.iworktech.com
Title: OpenLayers Regular Polygon Example
    Map Controls

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to