openlayers/openlayers — pull request #537 by adv-isu (2013-04-04 19:24:55+00:00)
Title: Add TextButtonPanel control for Zoom control-like text+CSS buttons

I have this implemented locally but am waiting for a CLA before I attach a pull request. The proposal is to create a simple subclass of Panel called TextButtonPanel to enable easy creation of vertical or horizontal "strips" of on-map, text-based buttons that are styled like the Zoom control. I'm hoping for feedback as to whether this would be useful to others/worth adding to the library.

The buttons themselves are just OpenLayers.Control.Buttons with a "text" property added. TextButtonPanel overrides Panel's createControlMarkup method to look for this property and add its contents to the control's panel div.

I've got style rules matching ".olControlTextButtonPanel" and ".olControlTextButtonPanel .olButton" that mimic those for "div.olControlZoom" and "div.olControlZoom a".

The benefit of such a control is mostly the automatic association with a certain set of style rules, so users can match the default look and feel without copying and pasting the Zoom control's CSS into their own stylesheets for each such button they add to their map.

I hope this is clear enough without code. Hopefully our CLA will go through and I can attach the code soon.