• Tidak ada hasil yang ditemukan

Google Maps API 3

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Membagikan "Google Maps API 3"

Copied!
329
0
0

Teks penuh

For more information, refer to our Special Bulk Sales–Licensing eBook webpage at www.apress.com/info/bulksales. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity in respect of any loss or damage caused or alleged to be caused directly or indirectly by the information contained. in this work.

About the Author

About the Technical Reviewer

Acknowledgments

Introduction

Who This Book Is For

Downloading the Code

Introducing the Google Maps API

That's why the Maps API includes methods for making Ajax calls and other things that we now depend on other third-party libraries to do for us. This is not something to worry about as the Google Maps API only uses the decimal degree form.

Figure 1-1. The impact of the Deepwater Horizon oil spill visualized in Google Maps
Figure 1-1. The impact of the Deepwater Horizon oil spill visualized in Google Maps

Transferring from Version 2 to 3

GLOBAL VARIABLES ARE EVIL

I think this is great as it makes the API consistent and makes it really easy to extend. An example of this is when you need to use map boundaries.

Synchronous method calls

You cannot simply call the Map object's getBounds() method after initializing the map, because the map is not ready at that point and has no boundaries. Instead, you should listen for the bounds_changed event before trying to grab it.

Asynchronous method calls

Create a new polygon and immediately add it to the map var polyline = new google.maps.Polyline({. Create a new polygon and immediately add it to the map var polyline = new google.maps.Polyline({.

Figure 2-2. v2 vs. v3. The biggest difference in appearance is the look of the navigation bar, but it also  groups the map type options a bit differently
Figure 2-2. v2 vs. v3. The biggest difference in appearance is the look of the navigation bar, but it also groups the map type options a bit differently

Creating Your First Map

It is loaded with the

Gambar

Figure 1-1. The impact of the Deepwater Horizon oil spill visualized in Google Maps
Figure 1-2. The center of the world at latitude 0 and longitude 0 lays somewhere outside the west coast   of Africa
Figure 1-3. The coordinates for some major cities in the world. Notice when the values are negative and  when they are positive
Figure 2-3. In v3 it’s possible to have several InfoWindow objects open at the same time, something that was  impossible in v2
+7

Referensi

Dokumen terkait

Currently, local communities in Soppeng District are building small-scale adaptation strategies based on learned experiences and previous flood events.. Therefore,