Rails-Edition Source Code

Can be found here: http://googlemapsbook.com/gmaps_rails_code.zip

Also, don’t forget the live Ruby on Rails examples at http://book.earthcode.com

PHP-Edition Source Code

Can be found here: http://googlemapsbook.com/gmaps_php_code.tar.gz

Fully working examples and source are available for each listing in the book, which can be browsed by chapter, below. If you’re just interested in checking out some of the sweet stuff covered in the book, definitely check out custom tile overlays, sidebar point browsing, and our Blue Marble map.

Chapter 1: Introduction
Chapter 2: Getting Started
Chapter 3: Interacting with the User and the Server
Chapter 4: Geocoding Addresses
Chapter 5: Manipulating Third-Party Data
Chapter 6: Improving the User Interface
Chapter 7: Optimizing and Scaling for Large Data Sets
Chapter 9: Advanced Tips and Tricks
Chapter 10: Lines, Lengths, and Areas
Chapter 11: Advanced Geocoding Topics

Note Some code on the website may differ slightly from the listings presented in the printed book. We try to keep the examples here up to date as the API changes or methods improve. If there’s a dramatic difference, it will be noted and/or alternate examples will be provided.

To whet your appetite, you can also read a PDF of Chapter 4 in full.