Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- draw.on('drawstart',
- function(evt) {
- var sketch = evt.feature;
- var sketchGeom = sketch.getGeometry();
- // the 'change' event will will fired by mouse move or mouse click
- sketchGeom.on('change', function(evt) {
- // check the actual number of verticies against
- // my 'nodeCount' to see if the 'change' event
- // has created a vertex
- });
- sketchGeom.set('nodeCount', 1); // add my own property to track the number of verticies
- },
- this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement