On Tue, Mar 6, 2012 at 2:15 PM, fell_runner <[email protected]> wrote:
> Thanks for the reply, but I don't understand your answer.
>
> The vector layer has no features to start with.

When you move the mouse over the map there should a vector point following.

> The user activates the
> drawfeature control and I'm using the 'sketchstarted' event to determine the
> co-ordinates of where the user has started drawing.

You can try this (untested):

new OpenLayers.Control.Draw(layer, OpenLayers.Handler.Path, {
    callbacks: {
        point: function(point, line) {
            if (line.components.length == 2) {
                // user has actually started to draw,
                // and "point" is the first draw point
            }
        }
    }
});


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to