Skip to content

Instantly share code, notes, and snippets.

@SteveOscar
Last active March 7, 2016 17:35
Show Gist options
  • Save SteveOscar/5dae242ba10eee128dd3 to your computer and use it in GitHub Desktop.
Save SteveOscar/5dae242ba10eee128dd3 to your computer and use it in GitHub Desktop.
Building an interactive map using jVectorMap

Creating an Interactive Map With jVectorMap

Background

  • I've been using this JS library to build my mod-3 personal project.

Setting Up the Map

  • Downloading the correct files
  • Where to place the files in your Rails app
  • Adding a blank map to a view

Customizing the Map

  • preparing data for the map
  • passing data to the map from a Rails controller
  • configuring the color range
  • setting up labels for hovering on regions
  • loading new datasets/settings on button click without page reload

Refactoring

  • How to create one JS file to run all of your maps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment