Mapkick

Create beautiful Javascript maps with one line of Ruby. No more fighting with maping libraries!

Usage

World Map

<%= mapkick_world Item.all.group(:country).count %>

United States Map

<%= mapkick_usa Item.all.group(:state).count %>

Installation

Add this line to your application's Gemfile:

gem "mapkick"

And add the javascript files to your views. These files must be included before the helper methods, unless using the :content_for option.

For the world map, use:

<%= javascript_include_tag "/assets/datamaps.world.js", "mapkick" %>

For the united states map, use:

<%= javascript_include_tag "/assets/datamaps.usa.js", "mapkick" %>

If you intend to use both the world map, and the united states map, you must use:

<%= javascript_include_tag "/assets/datamaps.all.js", "mapkick" %>

No Ruby? No Problem

Check out datamaps.js

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: