GeoSearch.Init Tutorial
Run Initial Query from URL
A final feature that you might like to add to GeoSearch is the ability to parse an initial Query from the Location Bar URL.
In order for GeoSearch to know which parameter to look for in the URL, we need to pass a parameter "queryParam" to GeoSearch.Init()
If, for example, you want GeoSearch to look for a parameter marked by "q" in the URL, you would do as follows:
MetaCarta.GeoSearch.Init({'textDivId': 'list',
'mapDivId': 'map',
'queryParam': 'q'});
Now, by tacking a "q=chicken" on to the end of the URL, GeoSearch will initialize the page by searching for "chicken".
To see this in action, load ex.6.html?q=chicken .
Previous: Integrating with External GUI