Hi all,<br><br>I'am just working on my first app with OpenLayers in a editing context (wow it's fun) .<br><br>Here's my problem:<br>1) I have a WMS layer of point, The user push a button to start editing (ex: move a point). That button register the "click" event and then he click on the map to identify a point in the WMS layer. In the background, I launch a GetFeatureInfo with the X,Y;<br>
<br>map.events.register('click', map, onMapClick);<br><br>2) if the GetFeatureInfo find out a element at this location, I activate two editing tools (DrawFeature et ModifyFeature) and I draw a vector point. The user can then click anyone else on the map (I only keep the last point he click) or move the point.<br>
<br>controls = {<br> modify: new OpenLayers.Control.ModifyFeature(vector), <br> point: new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.Point) <br>}<br><br>function activetool() {<br>
for(key in controls) {<br> control.activate();<br> } <br>}<br><br>3) When the user as finish, the ACCEPT button update the database with the new position of the vector point and I unregister the click event. I also deactivate the two editing tools (DrawFeature et ModifyFeature).<br>
<br>map.events.unregister('click', this, onMapClick);<br><br>function deactivate() {<br> for(key in controls) {<br> control.deactivate();<br> } <br>}<br><br>Everything works great but after that, I can no longer reactivate the editing tool. Is it possible that when I unregister the click event for the GetFeatureInfo, the 'click' event required for the drawfeature tool is also deactivate? <br>
<br>thank you in advance!<br><br>MartinO<br>