Sketch event during drawing interaction in Openlayers 3?

المشرف العام

Administrator
طاقم الإدارة
I'm using OpenLayers-3 form my application. In openLayers-2 we can define a sample code as follow:

function drawDone(){ ...}function putPoint(){ ...}function sketchModified(){ ...}function cancel(){ ...}var callBackParams = { "done": drawDone, "point": putPoint, "modify": sketchModified, "cancel": cancel}var crtl = new OpenLayers.Control.DrawFeature( layer, OpenLayers.Handler.Polygon, {callBacks: callBackParams});map.addControls([crtl]);crtl.activate();In this manner, We have to add a feature to layer handly in drawDone funcation.Now, I want to implement this manner in OpenLayers-3. I've seen an example here from here. I posted my problem for this sample in this post. How can I implement this manner in OpenLayers-3?



أكثر...
 
أعلى