| leto.net |
|
blog code freebsd gitweb math pics travel writing
|
So you want to add those nifty search boxes to the google maps on your Wordpress blog (like on www.ucfmap.com) how do you do it?
Geopress uses the javascript library Mapstraction, which puts a
To get localsearch working with Geopress, you need to manually edit two case 'google': if (GMap2) {
if (GBrowserIsCompatible()) {
this.map = new GMap2(c); Directly after that last line, insert the following: var options = { suppressInitialResultSelection : true, searchFormHint : "this is the search hint" };
searchControl = new google.maps.LocalSearch(options); this.map.addControl(searchControl); You are half way there! Note that I have also chosen the option not to select the first result of the LocalSearch list and I have provided a search hint that will show up in the search box before it is clicked on.
Add this directly below those lines: You should be ready to go! |
|