HTML and CSS Reference
Figure 12-11. Adding the restroom pushpins
■ This is purely fictional data. if you happen to be at San Francisco's Pier 39 while reading this topic,
don't use this map to try to find a restroom.
There is a lot more that you can do with the mapping API. For example, you can display directions for getting
to a selected point of interest. You can even display where the traffic is currently heavy. Check out the interactive
SDK at http://www.bingmapsportal.com/isdk/ajaxv7 . You can try out each feature and the corresponding
In this chapter you combined the features of geolocation with Bing Maps to create a really useful web site.
Geolocation requests are processed asynchronously. After getting the geolocation object, you call its
getCurrentLocation() function and specify the success and error callback functions. The Position object is
passed to the callback function when the location has been retrieved. It contains the latitude, longitude, and
estimated accuracy. If the client has GPS capability, the Position object will also include the altitude, speed, and
Mapping platforms such as Bing Maps are really easy to use and integrate into your web page. In this
application you displayed the map and centered in on the current location. You also added pushpins to show
where the nearby restrooms are.