Hi,

I have accomplished this by

var ctrlPath = new OpenLayers.Control.DrawFeature(lyr,
OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'});

editControl.addControls([
...
        CtrlPath,
...
]);

CtrlPath.featureAdded = function()
{editControl.activateControl(editControl.controls[5]);}

When the dblclick occurs, featureAdded is called changing to the select
tool. The line is created. This throws an error in handler/point.js
(this.point has no properties). I don't no why, because it looks like the
same way as doing it interactive.

But the application works nevertheless.

Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/



-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von ibarkley
Gesendet: Freitag, 2. November 2007 21:01
An: [email protected]
Betreff: [OpenLayers-Users] re stricting path creation


Hello All (newbie question),
I've been swimming in OpenLayers for about a month now, and I have a very
simple problem, but for some reason, I can't get it to work: Whenever I use
a callback for the 'done' property for OpenLayers.Control.DrawFeature and
OpenLayers.Handler.Path, the path disappears. What I'm trying to accomplish
is when a user draws a path, after the doubleclick, I need the control to
change to select, or hover; therefore not allowing the user the ability to
create more paths on the map. Is this possible? can someone post some sort
of example that shows this? any help is much, much appreciated... 
--
View this message in context:
http://www.nabble.com/restricting-path-creation-tf4739952.html#a13554563
Sent from the OpenLayers Users mailing list archive at Nabble.com.

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

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

Reply via email to