Skip to content

Adding data to maphub

behas edited this page Jul 24, 2012 · 3 revisions

maphub offers three methods to add data. All of these require you to run rake db:migrate first, so that the database can be filled.

1. Adding map samples

This will only add a few users and sample maps to the portal, without annotations or map metadata. To do this, just run:

rake db:seed

Wait for the data to be loaded. Then, log in with user1@example.com and test.

2. Adding map samples with metadata

This will add seven maps to the portal, without annotations, but with map metadata. To do this, run:

cp db/seeds/maps.yaml.bak db/seeds/maps.yaml
rake db:seed

3. Adding a full sample dataset

This will add seven maps to the portal, without annotations, but with map metadata and control points, as well as Google Map overlays. To do this, simply execute:

rake db:data:load_dir

If you want to serve maps locally, download the sample dataset, expose them in a localhost web dir, and change the configuration in config/environments/development.rb

wget http://dl.dropbox.com/u/89140739/sample_data_screencast.tar.gz
tar xvfz sample_data_screencast.tar.gz

You can run serve your current directory using Python SimpleHTTPServer:

cd sample_data_screencast
python -m SimpleHTTPServer 9090