If you look through the Maps API code, you will find that the  
GoogleBar is really nothing more than the google.maps.LocalSearch  
control implemented within the Maps API.  While this means that it has  
a .clearResults() method, it also means that it will be virtually  
impossible to reliably access it because I don't think there is any  
public handle to access the thing and relay commands, etc.  The good  
news, though, is that you can deploy the google.maps.LocalSearch  
control on your own with just a couple of lines of code.  Check it out  
here:

http://www.google.com/uds/solutions/localsearch/reference.html

What you can do so that you have access to the control and its various  
methods would be deploy it like this:

window.lsc=new google.maps.LocalSearch();
map.addControl(window.lsc);

Then you can call window.lsc.goIdle(); from anywhere in your  
application to clear the results and return the control to its default  
state.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Apr 2, 2009, at 9:20 AM, Petrogad wrote:

>
> Sarris-
>
> Whether or not there is a function with the search bar, you should be
> able to write a quick javascript function that is toggled setting the
> text field to ''
>
> good luck
> -pete
>
> On Apr 1, 11:45 am, sarris <[email protected]> wrote:
>> Hi there, when i used the localsearch control i used to force the
>> Clear Results function using this
>> myLocalControl.clearMarkers();
>>
>> How can i do the same with the googleBar?
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to