[OpenLayers-Users] Info button in EditingToolbar

Maribel Bernal maribel.bernal at iviron.com
Tue Mar 30 10:16:34 EDT 2010


Hi, thanks at all for your responses.

Yes Brian, this code allows adding the control at map... but how can I 
to add the button at the "Editing Toolbar"?
I'm looking at "Editing Toolbar example", and the Toolbar by default has 
only 4 buttons (polygon, polyline, point and navigate controls)...
what is the correct way for add another button that activates the 
SelectFeature control?

Thanks

Mapmaker escribió:
> Hi Maribel,
>
> You might want to try giving the select control a global variable and then
> activating/deactivating it on your button click.
>
> var selectControl
>
> selectControl = new OpenLayers.Control.SelectFeature(layer)
> map.addControl(selectControl)
>
> To Activate: selectControl.activate();
> To Deactivate: selectControl.deactivate();
>
> BRYAN
>   




More information about the Users mailing list