Hi, Take a look at this example (1). Zoom in and out the map. You will see that the buttons completely disappear. That could be an other option to your issue.
(1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html Regards, Alexandre G. Allegri wrote: > Sorry, I've sent too fast the solution. It works, but how can I > overload the onClick event on the control to alert the user with "a > feature has been already added"? > In this case I don't have to stop observing the click but I need to > handle it in a custom way... > > 2009/1/28 G. Allegri <[email protected]>: > >> Solved (somehow...): >> >> function locAdded(feature){ >> for(i=0;i<3;i++){ >> panel.controls[i+1].deactivate(); >> >> OpenLayers.Event.stopObservingElement(panel.controls[i+1].panel_div); >> } >> } >> >> giovanni >> >> 2009/1/28 G. Allegri <[email protected]>: >> >>> Hello list, >>> I'm using the editingtoolbar control panel. I need to disable it after >>> any feature has been added (point, line or polygon), and reactivate it >>> if the feature gets deleted. >>> I've seen that calling: >>> >>> function locAdded(feature){ >>> panel.controls[1].deactivate(); >>> panel.controls[2].deactivate(); >>> panel.controls[3].deactivate(); >>> } >>> >>> deactivate the controls unitl the user click on the panel again... >>> this is not what I need. In fact the panel control has an onClick >>> handler that activate the control on which the onClick event has >>> happened (line 212 in Panel.js). >>> I've tried deactivating directly the panel, but the panel gets deleted. >>> >>> I need the panel to remain visible but "unclickable", until the unique >>> feature has been deleted from the layer. >>> >>> I've tried to overload the onClick panel's method, but I couldn't get >>> it to work... >>> Thanks for any hint. >>> >>> giovanni >>> >>> > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
