Archive Page 2
Hello All,
We’ve talked and talked about adding forums to this site and decided against it. We already do all of the support we can by email and encourage anyone who has trouble with anything in the books to contact us that way. If the problem is common enough we’ll blog about it instead. We also think that for all it’s UI short comings, the official API group is still the number 1 source for great support in this community. We just don’t want to fracture that.
However, if one of you is enterprising enough to start up a successful forum we’ll endorse it here to all of our readers and RSS subscribers. How’s that for a compromise?
Take care and good luck with all your maps!
Our three week entry period is over and we have selected the winners of a free copy of Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional.
From the over 450+ entries received we have randomly selected four lucky winners. They are:
- Ryan Irelan of Raleigh, NC, USA
- Daniel Leong of London, UK
- Mike Hodgson (location withheld)
- Aran Donohue (location withheld)
We have contacted each of the winners via email to arrange delivery of their prize. Congratulations!
Back in January, I demonstrated how to extend GMarker for text-based labels. In the interests of keeping things simple, I ignored any event handling, and just covered the nuts and bolts of how to make a wrapper class in JavaScript, and how to add the basic functionality we wanted.
Well, we had a number of requests by email for an explanation of how to set this up with clickable markers, so here it is. First, I’ve made a new version of the demo, which now features the traditional infoWindow popups, triggered by either marker clicks or selection from the sidebar.

If you just want the source for the new version, it’s right here. There’s a brief discussion of the changes, below the jump. Continue reading ‘Clickable LabeledMarker’
The Ruby on Rails code is ready to downloaded. Here’s how to get it up and running in your environment:
- Download the zip file, gmaps_rails_code.zip
- Create your own empty Rails application (rails your_app_name)
- Unzip gmaps_rails_code.zip in the root of your newly created application. When you unzip the file, you will see it contains five root directories: app, db, lib, public, standalone_scripts. You want these directories to overlay the directories of your own Rails application.
- set up your config/database.yml as appropriate for your environment. Most people just use root/no password for their development environment.
- in routes.rb, add a line to configure the home_url:
map.home '', :controller => 'app', :action=>'index' - run
rake db:migrateto load the schema. - In your config/environments/development.rb, add a line to specify your own Google Maps API key:
GOOGLE_MAPS_KEY=’your-google-maps-api-key’ - Start your rails server, and go to http://localhost:3000/app (or adjust if your server is on a different port). You should see a welcome page and links to all the chapter examples.
These steps will give you the code and an empty database. This is meant to set the stage for you work with the various examples in the book. You will need to run the various data imports (capitol city scaping, FCC structure import, TIGER/Line data processing, etc) per the instructions in the book to fully populate the database.
After following the steps here, the examples in chapters 2,3,9, and 10 should work immediately. The rest of the chapters require some amount of data (primarily the FCC towers data), so you will need to load that data for the examples to work.
Notes
The Google Maps key is the primary configuration setting you need to get started. There are some others you will need for later chapters, however. You can add these to config/environments/development.rb file as well:
TIGERLINE_DIR="/path/to/your/tigerline/data"
YAHOO_API_KEY="your_yahoo_api_key"
UK_POSTCODE_DIR="/path/to/your/uk/postcode/data" #the directory, not the file
Finally, note that the Ruby on Rails examples are live at http://book.earthcode.com.
To those of you who have emailed us about the source code for the Rails edition — thanks for your patience, it’s coming soon! I decided to present it as a one compressed file you can unpack over an existing Rails application skeleton. Stay tuned, the code is coming later today or tomorrow at the latest.
Search
About
You are currently browsing the Beginning Google Maps Applications weblog archives.
Latest
Archives
Categories
- Ajax (1)
- Cartography (1)
- Code (1)
- Data (2)
- Fixes (3)
- Geocoding (5)
- Geometry (2)
- JavaScript (7)
- KML (3)
- Overlays (6)
- PHP (6)
- Projections (1)
- Regex (1)
- Ruby on Rails (4)
- SQL (2)
- The Book (29)
- Uncategorized (3)
- Usability (1)
- User Experience (2)
- XML (2)



Subscribe