HTML and CSS Reference
In-Depth Information
I'm using a normal LAN-connected machine without cell or GPS support so it is using the IP to determine
the location. Consequently, the accuracy estimate is 80 km (about 50 miles).
Geolocation works on all current browsers. However, if you try this application on an older browser such
as iE8, you'll see the alert that geolocation is not supported.
Using Mapping Platforms
Simply displaying the latitude and longitude is not very interesting (or helpful). However, showing your location
relative to other points of interest is much more useful. And displaying them on a map with roads and other
reference points can really put this information to work. Fortunately, mapping technology has become so
sophisticated and accessible that this is really easy to do.
For the demonstration in this chapter i will be using Bing Maps. There are other mapping platforms available. if
you're interested, check out the article at
for an overview of the different mapping services.
Creating a Bing Maps Account
To use Bing Maps you'll need to first set up an account, which is free for developers. Once your account is created
you'll receive a key that you'll need to include when accessing the mapping API. I will take you through the
process of setting up an account.
eXerCISe 12-3. CreatING a BING MapS aCCOUNt
Go to the Bing Maps site at this address: . Click the
“Get an account” link.
in the next page, you'll need to log in with a Windows live id. if you don't have one,
click the Create button to create an account.
once you have signed in you should see the “Create an account” page shown in
Figure 12-6 .
Search WWH ::

Custom Search