I am quite new to OpenLayers. I have a polygonLayer for users to draw polygon vectors. The plotting feature is working fine.
polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");
map.addLayers([ polygonLayer ]);
var polygonControl = new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.Polygon);
map.addControl(polygonControl);
polygonControl.activate();
var editControl = new OpenLayers.Control.ModifyFeature(polygonLayer);
map.addControl(editControl);
editControl.activate(RESIZE);
What I want to do is to have event listeners after each plotting of a point. Supposedly, I want to show popups to assist the user in between each point of plotting. How could I achieve it?
Best Answer
Here's a simple way to get the coordinates of points as you draw them: