November 2011
Intermediate to advanced
384 pages
13h 23m
English
Earlier in this chapter, the section “Display a Specific Location with Google Maps” discusses how to use Google Maps to display a location. After you can locate the user, as explained in the preceding section, “Request the User’s Current Location,” it is possible to inject that information directly into a Google Maps JavaScript API object.
This is useful if you want to provide an interactive map that compares the user’s current location to another location, such as a corporate office or an attraction. Although the code in this example shows how to get the user’s location and set a marker, you can modify it by repeating step 6 below — with absolute latitude and longitude coordinates — and steps ...
Read now
Unlock full access