Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
143023864X_HT5.pdf
Скачиваний:
8
Добавлен:
21.02.2016
Размер:
7.98 Mб
Скачать

CHAPTER 5 USING THE GEOLOCATION API

map.setCenter(new google.maps.LatLng( parseFloat(position.coords.latitude), parseFloat(position.coords.longitude));

navigator.geolocation.getCurrentPosition(updateLocation,

handleLocationError);

Summary

This chapter discussed Geolocation. You learned the Geolocation location information—latitude, longitude, and other attributes—and where they can come from. You also learned about the privacy concerns that accompany Geolocation and you’ve seen how the Geolocation API can be used to create compelling, location–aware web applications.

In the next chapter, we’ll demonstrate how HTML5 lets you communicate between tabs and windows as well as between pages and servers with different domains.

133