GeoSearch.Init Tutorial
Adding the GeoSearch Library
The next step to adding GeoSearch to your page is to add the Javascript library to your page. The way to include Javascript libraries is via the script tag.
Depending on where you are loading GeoSearch from, the exact URL of your GeoSearch Javascript library will be different.
Web Services |
<script src="http://developers.metacarta.com/tools?apikey=APIKEY&file=GeoSearch.js"> </script> The value of APIKEY for a given domain can be obtained from your account information page. |
GTS Appliance |
<script src='http://metacarta.example.com/developers/tools?version=1.0.0&file=GeoSearch.js'> </script> In this example, metacarta.example.com is the hostname of the MetaCarta GTS Appliance. |
This element should be placed between the opening and closing head tags of the page. It will not have any visual affect on the page, but will let us call Javascript functions from the GeoSearch library. To see the full HTML for this, you can refer to the source of example 2.
Previous: Creating Simple HTML Page | Next: Turning GeoSearch On