Editing Maps

(The information below is out of date. For current instructions, see: http://www.menhardt.com/geotest)

To put a map on any page, use:

<%= map :center => "-122.00958967208862, 37.301094586321284" %> 

The :center parameter can be determined by going to http://www.cupertinobaseball.org/cupertino-baseball2.html moving to the location, clicking on the map, and then reading the coordinates underneath the map.

Locator

You can also temporarily add a locator to any map using:

<%= map :center => "-122.00958967208862, 37.301094586321284", :locator => true %> 

Parameters

Here are the parameters that can be used with maps:

:center => "-122.01686382293701, 37.31932181336203"  :locater => true # When on, the coordinates will appear underneath the map when you click on it. :width => "525"  :height => "500"  :zoom => "3" # Smaller numbers zoom in closer :boundary_line => true # Puts in the boundary lines for Tri-Cities :key => Abp123asdfu77asncZDSf # The Google maps key :marker => "-122.02016830444336, 37.31850270698815" # Used to show the marker at a different location than :center. :text => "Tri-Cities Little League" # The text to appear when you click on the marker :url => "http://www.tricitiesbaseball.org" # The URL to go to when the text is clicked 

Examples

Here an example that will show the Tri-Cities boundaries:

<%= map :width => "525", :height => "500",       :center => "-122.01686382293701, 37.31932181336203",       :zoom => "3",       :boundary_line => true,       :marker => "-122.02016830444336, 37.31850270698815",       :text => "Tri-Cities Little League",       :url => "http://www.tricitiesbaseball.org" %> 

Here is an example that shows two markers:

<%= map :width => "500", :height => "400",    :center => "-122.024846, 37.306761",   :markers => [     {:point => "-122.02517867088318, 37.306505188827586",       :text => "Meyerholz Field 1"},     {:point => "-122.0241916179657, 37.30522511298032",      :text => "Meyerholz Field 2"}] %> 

Here is a sample map: