HTML and CSS Reference
In-Depth Information
Figure 12-4. Integrating the Geolocation API with Google Maps
As you can see, the web form consists of a button and a <div> element that holds a map. When the
page is loaded in the browser, by default the map is centered on Mumbai. If you click Show Current
Location, a callout is displayed that points to the user's current location.
To develop this application, you need to reference the Google Maps JavaScript library in the markup.
Listing 12-4 shows how this is done.
Listing 12-4. Referencing the Google Maps API Library
<html>
<head>
 
Search WWH ::




Custom Search