I've set up a simple web application where users can draw vectors (points, lines and polygons) using OpenLayers.
Actually digitizing is handled controls (
OpenLayers.Control.DrawFeature) and I'm using
featureunselected listeners to save edits in the database.
I want to be able to manually add features, and
insertXY() method of
OpenLayers.Control.DrawFeature (full reference: http://dev.openlayers.org/docs/files/OpenLayers/Control/DrawFeature-js.html#OpenLayers.Control.DrawFeature.insertXY) to add x and y values, manually or using browser geolocation. This is working fine on PATH and POLYGON controls, but it's not working as expected on POINT control. In fact it's not working at all.
When I fire
insertXY method no point is added on the map and no callback function is called. Am I missing something? I tried also to call the
finishSketch() method after
insertXY(), but I get the following error:
TypeError: this.handler.finishGeometry is not a function
insertXY does not work with points?