UI for viewing tracks created on top of Swisstopo material
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
api
static
.gitignore
README
start.html

README

Some background
===============
This tool was created in the context of #makeopendata hackdays for this particular project http://makeopendata.ch/forum/discussion/13/wandervorschlaege
However, much bigger motivation was that me getting started with using OpenLayers and the awesome http://api.geo.admin.ch/ APIs.

The tool allows you to create(digitize) a track(polyline) using Swisstopo maps and save the result in a Fusion Table.

LIVE demo URL: http://www.vasile.ch/hacks/geoadmin-tracks-editor/
Fusion Table URL: http://www.google.com/fusiontables/DataSource?dsrcid=1695530
Fusion Table KML link(for Google Earth): http://www.google.com/fusiontables/exporttable?query=select+col2+from+1695530+&o=kmllink&g=col2

How to use this tool
====================
If you are lazy just watch this video http://screencast.com/t/zVkUaKCQgfZA or
- open http://www.vasile.ch/hacks/geoadmin-tracks-editor/
- navigate to the area where you want to record a new track (use searchbox for quickly lookup known names)
- click 'Add new track', the mouse cursor will change, you can start registering your track. When done, double click to finish registering
- fill the Track name and click 'SAVE'
- in few seconds the track will be stored in FT and the KML layer will be refreshed


How to run this tool on localhost/your_domain
=============================================
0. Prerequisites
- you need a webserver running PHP with cURL lib client (my configuration is Apache/2.2.19 with PHP 5.3.6 on OSX Lion)
- you need a Google Account for managing Fusion Tables
- if you plan to use it on a non-localhost domain then you need to register in order to have access to the Swisstopo map tiles
http://www.geo.admin.ch/internet/geoportal/de/home/services/geoservices/display_services/api_services/order_form.html

1. Build the 'KML backend'
Create a similar FusionTable to this one http://www.google.com/fusiontables/DataSource?dsrcid=1695530
- two fields are required: name(text), geometry(location) - http://screencast.com/t/VrECESWmnML
- the table needs to be "public" or "unlisted" - http://screencast.com/t/tMNIFy1P6Mb
- copy the FT table id somewhere - http://screencast.com/t/SsBJwdH1 (in my case 1695530)

2. Prepare the PHP 'API' for FusionTables
- make a copy of api/ft_login_data.sample.php to api/ft_login_data.php
cp api/ft_login_data.sample.php api/ft_login_data.php
- edit api/ft_login_data.php and replace the $FUSION_TABLES_PARAMS dummy values with the table id, the google username and password used for the table