The GoogleBar: Now with Options!

Monday, December 10, 2007 at 1:33:00 PM

About a month ago we introduced Gmap2.enableGoogleBar(), a command that puts our normal logo against a white background and adds an expandable local search box. The local search box is based on the configurable LocalSearchControl, so developers immediately asked when they'd be able to use the same options for the GoogleBar.

Well, a ton of you clamored for customization, so we put a rush order on it. Now, in v2.95, we have a new GMapOptions option: googleBarOptions (I know, so many options!). Those options will get fed into the LocalSearchControl when you call enableGoogleBar. It currently supports all the same options as the LocalSearchControl (with some constants renamed to our namespace), and also adds a showOnLoad boolean to let you pop out the search box upon map load. You can play with the options in the playground below to see some simple customization - but I bet that with all the callbacks available, you can come up with more innovative uses of the control than alerting after the search is complete. :) As always, please post questions (or examples of what you've done) in the forum.