Unfortunately, I don't know that there is an easy way to do this with
the google.maps.LocalSearch control. You could, however, add an
onGenerateMarkerHtml callback that would set a timeout of, say, 100
milliseconds to call map.closeInfoWindow(). Something like this would
close the infowindow almost immediately after it was opened:
lsc.onGenerateMarkerHtmlCallback=function(){setTimeout({function()
{map.closeInfoWindow();},100);}; // where lsc is the LocalSearch
control, and map is the map it's on.
Then, to re-allow the infowindow, you would call
lsc.onGenerateMarkerHtmlCallback=null;
You might also be able to override LocalSearch.prototype.bootComplete
before you initialize the control so that, instead of using
GEvent.bind to assign the click listener, it calls an enable routine
that would look something like this:
google.maps.LocalSearch.prototype.enableMarkerClick=function(){
var lsc=this;
lsc
.clickListener
=GEvent.addListener(lsc.gmap,'click',function(marker,point)
{lsc.onMapClick(marker,point);});
}
Then you could add a disable routine like this:
google.maps.LocalSearch.prototype.disableMarkerClick=function(){
var lsc=this;
if(lsc.clickListener){GEvent.removeListener(lsc.clickListener);}
lsc.clickListener=null;
}
Beware, I haven't tested any of this, so it might not work at all.
Just brainstorming.
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
jgee...@mchsi.com
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
!