[OpenLayers-Users] Snap

Iacovlev Pavel iacovlev.pavel at gmail.com
Tue Oct 28 06:24:29 EDT 2008


Good day all
    I want to implement snap to WFS layer then drawing a geometry. I got the
drawing part and added my WFS layer, but I don't know how to make the
geometry snap to my WFS layer.
    I found
http://dev.openlayers.org/sandbox/camptocamp/feature/examples/modify-feature.html,
and the example is exactly what I need but it does not work with latest
OpenLayers.js, I assume the snap code in not included and is only present in
camptocamp sandbox. 

My code at the moment is:
YAHOO.map.snapVertex = {methods: ['vertex', 'edge'], layers: [snapLayer]};

this.control = new OpenLayers.Control.DrawFeature(YAHOO.map.vectorLayer
    ,OpenLayers.Handler.Path
    ,{drawFeature: this.drawFeature, handlerOptions: YAHOO.map.snapVertex}
);

I get no errors using the current OpenLayers.js but the snap does not work
also.
Can I get a little help, assist or directions about how to make snapping
work with current OpenLayers?

-- 
View this message in context: http://www.nabble.com/Snap-tp20187491p20187491.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list