AngelMap source code available
posted Oct 06, 2007
The source code and documentation for AngelMap is now available on the new AngelMap project page hosted at RubyForge. The code is released as open source under the GNU General Public License.
The project page also provides a place to report bugs, request features, or post to forums about AngelMap.
Here’s an excerpt from the README file to help you get started quickly.
Get the Code
You can get the code using subversion by running:
svn checkout http://angelmap.rubyforge.org/svn/trunk/ angelmap
Or you can download a source code package from the AngelMap files area at RubyForge
Building and Running AngelMap
Ok, you’ve got the code on your local machine. Here’s how to get it running.
Step 1: Install prerequisites
You’ll need a Ruby on Rails environment. The easiest way to get started is with one of the available one-step runtime environments that are available.
- Mac OS X: Locomotive
- Windows: InstantRails
If you’re on Linux, I don’t think there are any instant distributions available yet. The InstantRails page says that a port is planned. There are many HOWTOs available though. Here’s a few that I found — let me know if you have other suggestions.
Step 2: Database Setup
The code you just checked out is configured to run on MySql 5. If you’re using InstantRails then you’re all set. Locomotive uses SQLite instead of MySQL. You can either manually install MySQL and use it, or modify the AngelMap configuration to use SQLite (I haven’t tried this yet).
You can use databases other than MySQL 5 by editing the config/database.yml file. That same file is where you can configure your database username, password and hostname (if you need something other than the defaults of root, no password and localhost).
Here’s the steps to set up your database
- Edit
config/database.ymlif needed. - Create the development database
mysqladmin create angelmap_development - Create the test database
mysqladmin create angelmap_test - Create the tables
rake db:migrate
Step 3: Populate Database
Populate the database with the list of airports and missions.
- Populate the airports table. This takes a few minutes … be patient.
lib/util/update_airports.rb - Get fresh list of Angel Flight missions through the RSS feeds
lib/util/update_missions.rb
Step 4: Go!
- Run tests
rake - Start server
ruby script/server - Browse to http://localhost:3000
That should all work.
If you want to run this at an address other than http://localhost:3000, then you’ll need to get a Google Maps API key (it’s easy and free). Once you’ve got your own key, edit config/environment.rb and put your Google Maps API key where it says GeoKit::Geocoders::google = 'REPLACE_WITH_YOUR_GOOGLE_KEY'.
Credits
AngelMap was made possible by several other projects.
- Ruby on Rails – a great web application framework
- Google maps API – used to plot missions on the map
- Geokit plugin – used to determine which airports are near each other
- The available Angel Flight RSS feeds from Angel Flight West, Central and Southeast.
- GPX Aviation Waypoint Generator – used to create the database of airports
Add your comment
Comments will be made public. You can send a private message via the contact form