~ merge
authorAlexandre Bertails <bertails@w3.org>
Thu, 25 Aug 2011 16:57:37 -0400
changeset 101 7562c185d2fd
parent 100 0b3b2d6779b8 (current diff)
parent 98 862a94cf3a21 (diff)
child 102 ab69792e8bc3
~ merge
--- a/src/main/resources/scripts/map.js	Thu Aug 25 16:57:19 2011 -0400
+++ b/src/main/resources/scripts/map.js	Thu Aug 25 16:57:37 2011 -0400
@@ -69,11 +69,12 @@
 }
 
 function getWorkouts() {
-	return [{"activity": "http://dbpedia.org/resource/Running", "time": 123456789, "duration": 3600000, "distance": 12.000000, "json": "http://localhost:2719/user/jdoe/workout/4e5551a8b7607d33c418ce32.json", "gpx": "http://localhost:2719/user/jdoe/workout/4e5551a8b7607d33c418ce32.gpx" }, { "activity": "http://dbpedia.org/resource/Running", "time": 123456789, "duration": 3600000, "distance": 12.000000, "json": "http:localhost:2719/user/jdoe/workout/4e556fd5b7604c3c65eaed29.json", "gpx": "http://localhost:2719/user/jdoe/workout/4e556fd5b7604c3c65eaed29.gpx" }];
+	//return Util.requestJSON('http://localhost:2719/user/[email protected]/workouts');
+	return [ { "activity": "http://dbpedia.org/resource/Running", "date": 1312971214000, "duration": 6652, "distance": 12.000000, "json": "http://localhost:2719/user/[email protected]/workout/4e56a110ccf2406c3515bccb.json", "gpx": "http://localhost:2719/user/[email protected]/workout/4e56a110ccf2406c3515bccb.gpx" }, { "activity": "http://dbpedia.org/resource/Running", "date": 1309083594000, "duration": 14703, "distance": 12.000000, "json": "http://localhost:2719/user/[email protected]/workout/4e56a250ccf23d3128a27d0f.json", "gpx": "http://localhost:2719/user/[email protected]/workout/4e56a250ccf23d3128a27d0f.gpx" } ];
 }
 
 function getWorkout(uri) {
-	return Util.requestJSON('Jun-26-11.json');
+	return Util.requestJSON(uri);
 	//return Util.requestJSON(uri);
 }
 
@@ -107,8 +108,8 @@
 function showResult(workout) {
 	// update the map
 	OLMap.clearMap();
-	//OLMap.addTrail(workout.gpx, "red");
-	OLMap.addTrail("Jun-26-11.gpx", "red");
+	OLMap.addTrail(workout.gpx, "red");
+	//OLMap.addTrail("Jun-26-11.gpx", "red");
 	// fetch the json data containing the events
 	workout = getWorkout(workout.json);
 	// center the map on the events
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/resources/templates/gpx.ssp	Thu Aug 25 16:57:37 2011 -0400
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx creator="BuddyRunner.com" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
+
+<metadata>
+	<time>2011-08-10T06:13:35.711-0400</time> <!-- From the schema: "The creation date of the file." - Optional -->
+	<extensions>
+		<activity>http://dbpedia.org/resource/Running</activity>
+		<time></time>
+		<duration></duration>
+		<distance></distance>
+		<useragent><useragent>
+	</extensions>
+</metadata>
+
+<trk>
+<trkseg>
+
+<!-- A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data. -->
+
+	<trkpt lat="42.412414" lon="-71.140267">
+		<time>2011-08-10T06:13:34.000-0400</time>
+		<ele>-31.0</ele>
+	</trkpt>
+	<trkpt lat="42.412457" lon="-71.140305">
+		<time>2011-08-10T06:13:37.000-0400</time>
+		<ele>-34.0</ele>
+	</trkpt>
+</trkseg>
+</trk>
+</gpx>
\ No newline at end of file