Google Maps API 3
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
■ CONTENTS<br />
Creating a Map .....................................................................................................................................10<br />
Markers ................................................................................................................................................12<br />
InfoWindows.........................................................................................................................................14<br />
Polylines ...............................................................................................................................................16<br />
Polygons ...............................................................................................................................................17<br />
Events...................................................................................................................................................19<br />
Summary .......................................................................................................................21<br />
■ Chapter 3: Creating Your First Map ...................................................................23<br />
Setting the Scene ..........................................................................................................23<br />
The HTML Page.....................................................................................................................................23<br />
What Flavor of HTML to Use .................................................................................................................24<br />
Validate Your Code ...............................................................................................................................24<br />
Other Tools ...........................................................................................................................................27<br />
Laying the Foundation ..........................................................................................................................27<br />
Time to Start Coding......................................................................................................32<br />
Debugging Tool: Firebug ......................................................................................................................36<br />
Setting Up the Map...............................................................................................................................37<br />
Making the Code Run on Page Load.....................................................................................................40<br />
Creating <strong>Maps</strong> for Mobile Devices.................................................................................43<br />
Summary .......................................................................................................................43<br />
■ Chapter 4: Taking the Map Further with MapOptions........................................45<br />
A Fresh Start..................................................................................................................45<br />
Controlling the User Interface........................................................................................46<br />
disableDefaultUI ...................................................................................................................................46<br />
mapTypeControl ...................................................................................................................................47<br />
mapTypeControlOption .........................................................................................................................48<br />
navigationControl .................................................................................................................................53<br />
navigationControlOptions .....................................................................................................................54<br />
scaleControl..........................................................................................................................................57<br />
vi