Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. draw.on('drawstart',
  2. function(evt) {
  3. var sketch = evt.feature;
  4. var sketchGeom = sketch.getGeometry();
  5. // the 'change' event will will fired by mouse move or mouse click
  6. sketchGeom.on('change', function(evt) {
  7. // check the actual number of verticies against
  8. // my 'nodeCount' to see if the 'change' event
  9. // has created a vertex
  10. });
  11. sketchGeom.set('nodeCount', 1); // add my own property to track the number of verticies
  12. },
  13. this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement