I'm trying to use the split control to cut a line (LineString) with the
conditione that the line can only be cut in 2 parts.

I tried to use the split event with the following code:

split: function(event) {
        var a = event.original;
        var b = event.features;
        if (b.length>2)
                //do something to stop splitting

but I couldn't find a way to accomplish it. I tried all of the following
to no avail:
event.features=null
this.deactivate()
event.features=event.original

Is there a simple way to do it or should I use a 2 steps strategy,
setting a flag in the split event and restoring the original feature in
the aftersplit event?

Thank you

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

Reply via email to