Google Maps in Radiant Using

This is how i got Google Maps working in Radiant CMS via the google_maps extension.

This one is pretty easy, but you should know that you HAVE to be using MySQL or PostgreSQL because google_maps uses the spatial adapter plugin which needs one of those 2.

First install the GeoRuby gem.  Careful this is case sensitive:
sudo gem install GeoRuby

Next, from within your Radiant project’s root folder, clone the extension from github:
git clone git://github.com/rurounijones/radiant-google-maps-extension.git vendor/extensions/google_maps

Time to run the Rake tasks:
rake radiant:extensions:google_maps:api
rake production radiant:extensions:google_maps:migrate
rake production radiant:extensions:google_maps:update

Edit config/gmaps_api_key.yml and add your own Google Maps API key.

Add this R tag inside your layout’s head tag:
<r:google_map:header />

Goto the Maps tab in the Radiant Admin and create a map

Create a new page and name it something.  In the body of that page add:
<r:google_map:generate div=”my_gmap_div_name” id=”1″ />
<div id=”my_gmap_div_name” style=”height: 600px; width: 868px;”></div>

That provides a div for the map to go in, and calls the google_map generate tag with Map id 1.  Look on the github page for more stuff.