SHARE
TWEET

Untitled

a guest Jun 27th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top