Beginning Google Maps API 3

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book is OK but doesn't give up enough to build a complete solution. This book will help you build your maps basic user interface. The issue of managing data to place on the map is not addressed beyond hard-coding the data in the html. I would have preferred a more holistic approach.

Author(s): Gabriel Svennerberg
Edition: 2 Original
Publisher: Apress
Year: 2010

Language: English
Pages: 329

Prelim......Page 1
Contents at a Glance......Page 6
Contents......Page 7
About the Author......Page 15
About the Technical Reviewer......Page 16
Acknowledgments......Page 17
Introduction......Page 18
Introducing the Google Maps API......Page 19
A Brief History......Page 20
Focus on Performance......Page 21
Coordinates......Page 22
Summary......Page 24
A New Namespace......Page 25
Synchronous vs. Asynchronous......Page 26
Adding a Reference to the API......Page 27
Creating a Map......Page 28
Markers......Page 30
Marker Icons......Page 31
InfoWindows......Page 32
Polylines......Page 34
Polygons......Page 35
Events......Page 37
Further Reading......Page 38
Summary......Page 39
The HTML Page......Page 41
Validate Your Code......Page 42
Laying the Foundation......Page 45
The ......Page 46
The Style Sheet......Page 47
Inserting a Reference to the Google Maps API......Page 48
Initializing the Map......Page 49
Variables in JavaScript......Page 50
Common Data Types......Page 51
Functions......Page 52
Debugging Tool: Firebug......Page 54
The Map Container......Page 55
MapOptions......Page 56
Making the Code Run on Page Load......Page 58
Encapsulating the Code......Page 59
Summary......Page 61
A Fresh Start......Page 63
disableDefaultUI......Page 64
mapTypeControl......Page 65
style......Page 66
position......Page 67
mapTypeIds......Page 69
navigationControl......Page 71
position......Page 72
style......Page 73
scaleControl......Page 75
disableDoubleClickZoom......Page 76
streetViewControl......Page 77
backgroundColor......Page 79
draggableCursor......Page 80
Controlling the Map Settings with Methods......Page 81
Getting and Setting the Zoom Level......Page 82
Putting the Methods to Use......Page 83
Changing the Center......Page 86
Zooming in......Page 87
CSS......Page 89
Summary......Page 90
Setting a Starting Point......Page 91
A Simple Marker......Page 92
Adding a Tooltip......Page 93
Changing the Icon......Page 94
Icons Supplied by Google......Page 95
The Complete Code So Far......Page 96
Adding an InfoWindow......Page 97
A Word or Two About Events......Page 98
Adding a Click Event to the Marker......Page 99
The Complete Code......Page 100
JavaScript Arrays......Page 101
Adding U.S. Cities to the Map......Page 103
Adding InfoWindows......Page 106
Nesting the Event Listener Inside a Function......Page 108
Dealing with Several Windows......Page 110
Introducing the LatLngBounds Object......Page 114
Let the API Do the Heavy Lifting......Page 115
The Complete Code......Page 116
Summary......Page 118
Setting a Starting Point......Page 119
MarkerImage’s Five Properties......Page 120
Putting It Together......Page 121
Adjusting the Shadow......Page 122
Enabling and Disabling the Shadow......Page 124
Defining a Clickable Area......Page 125
The Complete Code......Page 127
Using Sprites......Page 128
Sprite Support......Page 129
The Complete Code......Page 132
google-maps-icons......Page 133
Mapito Map Marker Icons......Page 134
Changing the Marker Icon According to Mouse Events......Page 135
Adding the Events......Page 136
Click......Page 137
The Complete Code......Page 138
A Clever Way of Dealing with Lots of Different Marker Icons......Page 140
Faking an Ajax Call......Page 142
The Complete Code......Page 144
Google Maps Icon Shadowmaker......Page 146
Summary......Page 147
Setting a Starting Point......Page 149
Style Sheet......Page 150
Adding Rich Content to the InfoWindow......Page 151
Providing the HTML As a String......Page 152
Styling the Content......Page 154
The JavaScript Code......Page 155
Browser Support......Page 157
Examining the