Can anyone help me to convert this function so that it is not dependant on the ol3-debug file as I don't know quite what is replaced upon build. The function works but only in debug mode.
It is in reference to this question: Sketch event in Openlayers 3 drawing interaction
The intention is that it will allow me to display each features co-ords as they are drawn on-screen.
geometryFunction: function (c, g) { if (goog.isDef(g)) { g.setCoordinates(c); } else { g = new ol.geom.LineString(c); } if (c[0].length > ct) { console.log('click coord : ' + c[0][c[0].length - 1]); ct = c[0].length; } else { console.log('move coord : ' + c[0][c[0].length - 1]); } return g; }
أكثر...
It is in reference to this question: Sketch event in Openlayers 3 drawing interaction
The intention is that it will allow me to display each features co-ords as they are drawn on-screen.
geometryFunction: function (c, g) { if (goog.isDef(g)) { g.setCoordinates(c); } else { g = new ol.geom.LineString(c); } if (c[0].length > ct) { console.log('click coord : ' + c[0][c[0].length - 1]); ct = c[0].length; } else { console.log('move coord : ' + c[0][c[0].length - 1]); } return g; }
أكثر...