Skip to content

A slightly more railsified Google maps wrapper with geocoder.

License

Notifications You must be signed in to change notification settings

glennpow/geographer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geographer
==========

This plugin has basic Google mapping functionality.  It can use the Geokit geocoder if it is installed.
If Geokit is installed, and you have a Google key already set up for it, then there is no further setup required for this plugin.
If you don't have Geokit, then you can set the key in an initializer:

  Geographer::GOOGLE_KEY = 'Your key'


Example
=======

Put this in the <head> of your page:

  <%= geographer_header %>

Then put this in your page content:

  <%= map_tag(:query => '1600 Pennsylvania Ave NW,Washington,DC,20500', :width => '400px', :height => '300px', :controls => [ :zoom ]) %>

The geokit geocoder will find the address.  Or you can pass a Geokit::Mappable object, as long as it uses the acts_as_mappable macro:

  <%= map_tag(:mappable => @location, :width => '400px', :height => '300px', :controls => [ :zoom ]) %>

If you don't want to use the geocoder, you can set the location manually, as well as set other options.

  <%= map_tag(:center => [ 35, -167 ], :zoom => 3, :controls => [ :large ]) %>


Copyright (c) 2008 Glenn Powell, released under the MIT license

About

A slightly more railsified Google maps wrapper with geocoder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages