27.10.2014 Views

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 />

■ Chapter 10: Location, Location, Location.........................................................211<br />

Geocoding....................................................................................................................211<br />

Restrictions.........................................................................................................................................211<br />

The Geocoder Object ..........................................................................................................................212<br />

Building an Address Lookup Web Page..............................................................................................212<br />

Reverse Geocoding......................................................................................................223<br />

Building a Reverse Geocoding Map....................................................................................................223<br />

The Complete Code for This Example.................................................................................................227<br />

Finding the Location of the User..................................................................................229<br />

IP-Based Geocoding ...........................................................................................................................229<br />

Creating a Location-Aware Map.........................................................................................................230<br />

The Complete JavaScript Code for This Example...............................................................................234<br />

Getting Better Accuracy......................................................................................................................235<br />

Summary .....................................................................................................................242<br />

■ Appendix: <strong>API</strong> Reference..................................................................................243<br />

How to Read the Reference .........................................................................................243<br />

Data Types..........................................................................................................................................243<br />

The Namespace...........................................................................................................244<br />

The Reference..............................................................................................................244<br />

Map Class ...........................................................................................................................................244<br />

MapOptions Object .............................................................................................................................248<br />

MapTypeId Class ................................................................................................................................249<br />

MapTypeControlOptions Object ..........................................................................................................250<br />

MapTypeControlStyle Class................................................................................................................250<br />

NavigationControlOptions Object........................................................................................................251<br />

NavigationControlStyle Class..............................................................................................................251<br />

ScaleControlOptions Object................................................................................................................252<br />

ScaleControlStyle Class......................................................................................................................252<br />

ControlPosition Class..........................................................................................................................252<br />

MapPanes Object................................................................................................................................254<br />

xi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!