Skip to content

Navigation Menu

Sign up
apneadiving edited this page Jul 14, 2011 · 18 revisions

I now want to give the choice of API to the users of the gem.

I've begun the work on the playground branch. Any help is welcome.

If you want to test using this branch, simply define the Map provider you want with:

<%= gmaps("markers" => {"data" => @json},
 "map_options" => { "provider" => "openlayers"}) %> 

For bing and mapquest, you need to provide an API key. Simply pass it as an argument:

<%= gmaps("markers" => {"data" => @json},
 "map_options" => { "provider" => "mapquest", "provider_key" => MAPQUEST_KEY, "auto_adjust" => true,"center_on_user" => true }) %>

Or:

<%= gmaps("markers" => {"data" => @json},
 "map_options" => { "zoom" => 5, "provider" => "bing", "provider_key" => BING_KEY, "auto_adjust" => true,"center_on_user" => true }) %> 

Current state of other APIs implementation

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /