HTML and CSS Reference
In-Depth Information
Figure 8-4. Determining the directions from a location
Use the jQuery and Google Maps JavaScript API V3 libraries:
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="http://j.maxmind.com/app/geoip.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js">
</script>
The HTML is similar to the geocoding example in the previous recipe, with the addition
of a drop-down box to select miles or kilometers. Also, instead of appending our results
to the page body, we'll add a div to hold the calculated distance and a div to hold the
Google Map:
<div class="field">
<label for="address">Enter a Destination Address:</label>
<input type="text" id="address" />
</div>
 
Search WWH ::




Custom Search