Gooby 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. data/README +218 -0
  2. data/bin/forerunner_xml_parser.rb +28 -0
  3. data/bin/forerunner_xml_parser.sh +16 -0
  4. data/bin/forerunner_xml_splitter.rb +60 -0
  5. data/bin/gen_gmap.rb +30 -0
  6. data/bin/gen_gmap.sh +19 -0
  7. data/bin/tests_gen.rb +13 -0
  8. data/data/20041113_richmond_marathon.csv +1036 -0
  9. data/data/20041113_richmond_marathon.xml +8663 -0
  10. data/data/20050305_corporate_cup_hm.csv +251 -0
  11. data/data/20050305_corporate_cup_hm.xml +2208 -0
  12. data/data/20050430_nashville_marathon.csv +1208 -0
  13. data/data/20050430_nashville_marathon.xml +10043 -0
  14. data/data/20051119_dowd_ymca_hm.csv +251 -0
  15. data/data/20051119_dowd_ymca_hm.xml +2210 -0
  16. data/data/20051124_hyatt_turkey_trot_8K.csv +321 -0
  17. data/data/20051124_hyatt_turkey_trot_8K.xml +2651 -0
  18. data/data/forerunner_2005.xml +259620 -0
  19. data/data/forerunner_2006.xml +190853 -0
  20. data/data/forerunner_2007.xml +259014 -0
  21. data/data/geo_data.txt +171 -0
  22. data/data/phx.csv +1280 -0
  23. data/data/phx.xml +10620 -0
  24. data/data/run_2007_01_01_16_38_27.xml +2020 -0
  25. data/data/run_2007_01_06_15_27_31.xml +2020 -0
  26. data/data/run_2007_01_10_12_25_47.xml +820 -0
  27. data/data/run_2007_01_10_22_44_54.csv +112 -0
  28. data/data/run_2007_01_10_22_44_54.xml +908 -0
  29. data/data/run_2007_01_11_10_48_45.xml +1292 -0
  30. data/data/run_2007_01_13_15_37_06.xml +1964 -0
  31. data/data/run_2007_01_14_15_46_02.xml +1368 -0
  32. data/data/run_2007_01_15_14_01_48.xml +1868 -0
  33. data/data/run_2007_01_20_16_22_05.xml +1702 -0
  34. data/data/run_2007_01_27_17_32_13.xml +3626 -0
  35. data/data/run_2007_01_28_19_14_52.xml +2538 -0
  36. data/data/run_2007_02_03_14_30_20.xml +2016 -0
  37. data/data/run_2007_02_04_18_02_30.xml +1476 -0
  38. data/data/run_2007_02_17_16_29_35.xml +1236 -0
  39. data/data/run_2007_02_19_14_44_33.xml +1816 -0
  40. data/data/run_2007_02_23_15_53_55.xml +36 -0
  41. data/data/run_2007_02_23_15_55_20.xml +1296 -0
  42. data/data/run_2007_02_24_15_01_35.csv +484 -0
  43. data/data/run_2007_02_24_15_01_35.xml +3884 -0
  44. data/data/test1.txt +4 -0
  45. data/lib/cls_counter_hash.rb +83 -0
  46. data/lib/cls_delim_line.rb +40 -0
  47. data/lib/cls_dttm.rb +84 -0
  48. data/lib/cls_duration.rb +87 -0
  49. data/lib/cls_forerunner_xml_parser.rb +183 -0
  50. data/lib/cls_forerunner_xml_splitter.rb +113 -0
  51. data/lib/cls_geo_data.rb +186 -0
  52. data/lib/cls_gooby_object.rb +23 -0
  53. data/lib/cls_google_map_generator.rb +368 -0
  54. data/lib/cls_history.rb +38 -0
  55. data/lib/cls_lap.rb +27 -0
  56. data/lib/cls_line.rb +78 -0
  57. data/lib/cls_options.rb +74 -0
  58. data/lib/cls_position.rb +49 -0
  59. data/lib/cls_run.rb +199 -0
  60. data/lib/cls_simple_xml_parser.rb +46 -0
  61. data/lib/cls_test_regen.rb +187 -0
  62. data/lib/cls_track.rb +52 -0
  63. data/lib/cls_trackpoint.rb +205 -0
  64. data/lib/mod_introspect.rb +33 -0
  65. data/lib/mod_io.rb +65 -0
  66. data/lib/mod_project_info.rb +81 -0
  67. data/lib/mod_string.rb +26 -0
  68. data/lib/mod_test_helper.rb +22 -0
  69. data/samples/20041113_richmond_marathon.html +532 -0
  70. data/samples/20050305_corporate_cup_hm.html +448 -0
  71. data/samples/20050430_nashville_marathon.html +530 -0
  72. data/samples/gps_point_capture.html +54 -0
  73. data/samples/phoenix_marathon.html +542 -0
  74. data/samples/run_2007_01_10_22_44_54.html +146 -0
  75. data/samples/run_2007_02_24_15_01_35.html +298 -0
  76. data/tests/tst_cls_counter_hash.rb +105 -0
  77. data/tests/tst_cls_delim_line.rb +72 -0
  78. data/tests/tst_cls_dttm.rb +129 -0
  79. data/tests/tst_cls_duration.rb +49 -0
  80. data/tests/tst_cls_forerunner_xml_parser.rb +68 -0
  81. data/tests/tst_cls_geo_data.rb +69 -0
  82. data/tests/tst_cls_gooby_object.rb +24 -0
  83. data/tests/tst_cls_google_map_generator.rb +107 -0
  84. data/tests/tst_cls_history.rb +44 -0
  85. data/tests/tst_cls_lap.rb +36 -0
  86. data/tests/tst_cls_line.rb +108 -0
  87. data/tests/tst_cls_options.rb +77 -0
  88. data/tests/tst_cls_position.rb +64 -0
  89. data/tests/tst_cls_run.rb +140 -0
  90. data/tests/tst_cls_simple_xml_parser.rb +48 -0
  91. data/tests/tst_cls_track.rb +68 -0
  92. data/tests/tst_cls_trackpoint.rb +143 -0
  93. data/tests/tst_gooby.rb +28 -0
  94. data/tests/tst_mod_introspect.rb +30 -0
  95. data/tests/tst_mod_io.rb +51 -0
  96. data/tests/tst_mod_project_info.rb +77 -0
  97. data/tests/tst_mod_string.rb +56 -0
  98. metadata +142 -0
@@ -0,0 +1,146 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
6
+ <title> Google Map by Gooby </title>
7
+ <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAdn5SVzjZKZKs1IRkFdx52xQg0TO_bCqGOTsRH2RbuhBZnI0wvRQW0Q92mw1taN1NJCk2cxlQQutfuA" type="text/javascript"></script>
8
+ <script type="text/javascript">
9
+ //<![CDATA[
10
+ function load() {
11
+ if (GBrowserIsCompatible()) {
12
+ var map = new GMap2(document.getElementById("map"));
13
+ map.addControl(new GLargeMapControl());
14
+ map.addControl(new GMapTypeControl());
15
+
16
+ var centerPoint = new GLatLng(35.495795, -80.84088);
17
+ map.setCenter(centerPoint, 14);
18
+
19
+
20
+ var points = new Array();
21
+ points.push(new GLatLng(35.49764,-80.84955)); // 1 (1 of 111.0) 2007-01-10T22:44:54Z 0 00:00:00 0.0
22
+ points.push(new GLatLng(35.49768,-80.84938)); // 2 (3 of 111.0) 2007-01-10T22:45:06Z 12 00:00:12 0.0111828122783003
23
+ points.push(new GLatLng(35.49779,-80.84903)); // 3 (5 of 111.0) 2007-01-10T22:45:27Z 33 00:00:33 0.0323908822261979
24
+ points.push(new GLatLng(35.49796,-80.8489)); // 4 (7 of 111.0) 2007-01-10T22:45:43Z 49 00:00:49 0.0471237551221188
25
+ points.push(new GLatLng(35.49822,-80.84882)); // 5 (9 of 111.0) 2007-01-10T22:46:04Z 70 00:01:10 0.0656423608432706
26
+ points.push(new GLatLng(35.49854,-80.84867)); // 6 (11 of 111.0) 2007-01-10T22:46:28Z 94 00:01:34 0.0893062088261944
27
+ points.push(new GLatLng(35.49891,-80.8485)); // 7 (13 of 111.0) 2007-01-10T22:46:55Z 121 00:02:01 0.116600011120098
28
+ points.push(new GLatLng(35.49914,-80.84839)); // 8 (15 of 111.0) 2007-01-10T22:47:11Z 137 00:02:17 0.133747981830073
29
+ points.push(new GLatLng(35.49908,-80.84805)); // 9 (17 of 111.0) 2007-01-10T22:47:32Z 158 00:02:38 0.15332074885252
30
+ points.push(new GLatLng(35.49899,-80.84759)); // 10 (19 of 111.0) 2007-01-10T22:47:58Z 184 00:03:04 0.179971922811475
31
+ points.push(new GLatLng(35.49889,-80.8471)); // 11 (21 of 111.0) 2007-01-10T22:48:26Z 212 00:03:32 0.208411662662138
32
+ points.push(new GLatLng(35.4988,-80.84663)); // 12 (23 of 111.0) 2007-01-10T22:48:53Z 239 00:03:59 0.235581308062409
33
+ points.push(new GLatLng(35.49869,-80.84614)); // 13 (25 of 111.0) 2007-01-10T22:49:22Z 268 00:04:28 0.264172396474253
34
+ points.push(new GLatLng(35.49859,-80.84571)); // 14 (27 of 111.0) 2007-01-10T22:49:47Z 293 00:04:53 0.289370268336243
35
+ points.push(new GLatLng(35.49848,-80.84521)); // 15 (29 of 111.0) 2007-01-10T22:50:15Z 321 00:05:21 0.318518817424989
36
+ points.push(new GLatLng(35.49826,-80.84481)); // 16 (31 of 111.0) 2007-01-10T22:50:42Z 348 00:05:48 0.345858465378363
37
+ points.push(new GLatLng(35.49796,-80.84442)); // 17 (33 of 111.0) 2007-01-10T22:51:13Z 379 00:06:19 0.376082679385477
38
+ points.push(new GLatLng(35.49764,-80.84403)); // 18 (35 of 111.0) 2007-01-10T22:51:43Z 409 00:06:49 0.407244992629068
39
+ points.push(new GLatLng(35.49738,-80.84365)); // 19 (37 of 111.0) 2007-01-10T22:52:11Z 437 00:07:17 0.435203291181872
40
+ points.push(new GLatLng(35.49708,-80.84328)); // 20 (39 of 111.0) 2007-01-10T22:52:39Z 465 00:07:45 0.464576364065138
41
+ points.push(new GLatLng(35.4968,-80.84287)); // 21 (41 of 111.0) 2007-01-10T22:53:08Z 494 00:08:14 0.494678171067848
42
+ points.push(new GLatLng(35.49655,-80.84253)); // 22 (43 of 111.0) 2007-01-10T22:53:34Z 520 00:08:40 0.520453520336123
43
+ points.push(new GLatLng(35.49629,-80.84219)); // 23 (45 of 111.0) 2007-01-10T22:54:00Z 546 00:09:06 0.546737046903595
44
+ points.push(new GLatLng(35.49605,-80.84182)); // 24 (47 of 111.0) 2007-01-10T22:54:25Z 571 00:09:31 0.573383135415603
45
+ points.push(new GLatLng(35.49584,-80.84144)); // 25 (49 of 111.0) 2007-01-10T22:54:50Z 596 00:09:56 0.599292844021932
46
+ points.push(new GLatLng(35.49571,-80.84096)); // 26 (51 of 111.0) 2007-01-10T22:55:18Z 624 00:10:24 0.627755163039149
47
+ points.push(new GLatLng(35.49554,-80.84045)); // 27 (53 of 111.0) 2007-01-10T22:55:49Z 655 00:10:55 0.658754186409555
48
+ points.push(new GLatLng(35.49541,-80.83998)); // 28 (55 of 111.0) 2007-01-10T22:56:17Z 683 00:11:23 0.686679905063069
49
+ points.push(new GLatLng(35.49528,-80.83953)); // 29 (57 of 111.0) 2007-01-10T22:56:44Z 710 00:11:50 0.713566571883795
50
+ points.push(new GLatLng(35.49515,-80.8391)); // 30 (59 of 111.0) 2007-01-10T22:57:09Z 735 00:12:15 0.739368179184334
51
+ points.push(new GLatLng(35.495,-80.83856)); // 31 (61 of 111.0) 2007-01-10T22:57:40Z 766 00:12:46 0.77146581439612
52
+ points.push(new GLatLng(35.49487,-80.83811)); // 32 (63 of 111.0) 2007-01-10T22:58:07Z 793 00:13:13 0.798338254277855
53
+ points.push(new GLatLng(35.49472,-80.83764)); // 33 (65 of 111.0) 2007-01-10T22:58:35Z 821 00:13:41 0.826737526411478
54
+ points.push(new GLatLng(35.49466,-80.83742)); // 34 (67 of 111.0) 2007-01-10T22:58:52Z 838 00:13:58 0.840076132826643
55
+ points.push(new GLatLng(35.49451,-80.83704)); // 35 (69 of 111.0) 2007-01-10T22:59:17Z 863 00:14:23 0.863959636500997
56
+ points.push(new GLatLng(35.49434,-80.83661)); // 36 (71 of 111.0) 2007-01-10T22:59:43Z 889 00:14:49 0.890882759945099
57
+ points.push(new GLatLng(35.49408,-80.83622)); // 37 (73 of 111.0) 2007-01-10T23:00:10Z 916 00:15:16 0.91923921167447
58
+ points.push(new GLatLng(35.49389,-80.83588)); // 38 (75 of 111.0) 2007-01-10T23:00:35Z 941 00:15:41 0.942447013265988
59
+ points.push(new GLatLng(35.49371,-80.83566)); // 39 (77 of 111.0) 2007-01-10T23:00:50Z 956 00:15:56 0.96006417051236
60
+ points.push(new GLatLng(35.4935,-80.83528)); // 40 (79 of 111.0) 2007-01-10T23:01:16Z 982 00:16:22 0.985987911531073
61
+ points.push(new GLatLng(35.49326,-80.83489)); // 41 (81 of 111.0) 2007-01-10T23:01:44Z 1010 00:16:50 1.01372948843991 1.0 00:16:50
62
+ points.push(new GLatLng(35.4929,-80.83436)); // 42 (83 of 111.0) 2007-01-10T23:02:20Z 1046 00:17:26 1.05261471688646
63
+ points.push(new GLatLng(35.49266,-80.83395)); // 43 (85 of 111.0) 2007-01-10T23:02:47Z 1073 00:17:53 1.08102116260463
64
+ points.push(new GLatLng(35.49245,-80.83352)); // 44 (87 of 111.0) 2007-01-10T23:03:21Z 1107 00:18:27 1.10926934887535
65
+ points.push(new GLatLng(35.49264,-80.83337)); // 45 (89 of 111.0) 2007-01-10T23:03:36Z 1122 00:18:42 1.12503287867213
66
+ points.push(new GLatLng(35.4929,-80.83313)); // 46 (91 of 111.0) 2007-01-10T23:04:01Z 1147 00:19:07 1.14751704340475
67
+ points.push(new GLatLng(35.49326,-80.83279)); // 47 (93 of 111.0) 2007-01-10T23:04:31Z 1177 00:19:37 1.17890375318809
68
+ points.push(new GLatLng(35.49339,-80.83279)); // 48 (95 of 111.0) 2007-01-10T23:04:42Z 1188 00:19:48 1.18817674975591
69
+ points.push(new GLatLng(35.49376,-80.83292)); // 49 (97 of 111.0) 2007-01-10T23:05:09Z 1215 00:20:15 1.21507628916779
70
+ points.push(new GLatLng(35.49402,-80.83324)); // 50 (99 of 111.0) 2007-01-10T23:05:34Z 1240 00:20:40 1.24065516072
71
+ points.push(new GLatLng(35.49421,-80.83322)); // 51 (101 of 111.0) 2007-01-10T23:05:47Z 1253 00:20:53 1.254002590203
72
+ points.push(new GLatLng(35.4944,-80.83302)); // 52 (103 of 111.0) 2007-01-10T23:06:06Z 1272 00:21:12 1.27206283292987
73
+ points.push(new GLatLng(35.49472,-80.83264)); // 53 (105 of 111.0) 2007-01-10T23:06:37Z 1303 00:21:43 1.30282212665965
74
+ points.push(new GLatLng(35.49507,-80.83238)); // 54 (107 of 111.0) 2007-01-10T23:07:04Z 1330 00:22:10 1.3311744414629
75
+ points.push(new GLatLng(35.49539,-80.83221)); // 55 (109 of 111.0) 2007-01-10T23:07:29Z 1355 00:22:35 1.35526252304726
76
+ points.push(new GLatLng(35.49545,-80.83225)); // 56 (111 of 111.0) 2007-01-10T23:07:36Z 1362 00:22:42 1.36020710502239
77
+
78
+ var routePolyline = new GPolyline(points);
79
+ map.addOverlay(routePolyline);
80
+
81
+ // Create a base icon for all of our markers that specifies the
82
+ // shadow, icon dimensions, etc.
83
+ var baseIcon = new GIcon();
84
+ baseIcon.shadow = "http://www.joakim-systems.com/gicons/shadow50.png";
85
+ baseIcon.iconSize = new GSize(20, 34);
86
+ baseIcon.shadowSize = new GSize(37, 34);
87
+ baseIcon.iconAnchor = new GPoint(9, 34);
88
+ baseIcon.infoWindowAnchor = new GPoint(9, 2);
89
+ baseIcon.infoShadowAnchor = new GPoint(18, 25);
90
+
91
+ var iconStart = new GIcon(baseIcon);
92
+ iconStart.image = "http://www.joakim-systems.com/gicons/dd-start.png";
93
+ var pStart = new GPoint(-80.84955, 35.49764);
94
+ var mStart = new GMarker(pStart, iconStart);
95
+ GEvent.addListener(mStart, "click", function() {
96
+ mStart.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Start!</b></td></tr><tr><td>Distance: </td><td>0.0</td></tr><tr><td>Time of Day: </td><td>2007-01-10T22:44:54Z </td></tr><tr><td>Elapsed Time: </td><td>00:00:00 </td></tr><tr><td>Average Pace: </td><td> </td></tr><tr><td>Lat/Lng: </td><td>35.49764 , -80.84955 </td></tr><tr><td>Altitude: </td><td>264.981m </td></tr></table>");
97
+ });
98
+ map.addOverlay(mStart);
99
+
100
+ var icon1 = new GIcon(baseIcon);
101
+ icon1.image = "http://www.joakim-systems.com/gicons/marker1.png";
102
+ var p1 = new GPoint(-80.83489, 35.49326);
103
+ var m1 = new GMarker(p1, icon1);
104
+ GEvent.addListener(m1, "click", function() {
105
+ m1.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 1</b></td></tr><tr><td>Distance: </td><td>1.01372948843991</td></tr><tr><td>Time of Day: </td><td>2007-01-10T23:01:44Z </td></tr><tr><td>Elapsed Time: </td><td>00:16:50 </td></tr><tr><td>Average Pace: </td><td>16:36.3 </td></tr><tr><td>Lat/Lng: </td><td>35.49326 , -80.83489 </td></tr><tr><td>Altitude: </td><td>258.251m </td></tr></table>");
106
+ });
107
+ map.addOverlay(m1);
108
+
109
+ var iconFinish = new GIcon(baseIcon);
110
+ iconFinish.image = "http://www.joakim-systems.com/gicons/dd-end.png";
111
+ var pFinish = new GPoint(-80.83225, 35.49545);
112
+ var mFinish = new GMarker(pFinish, iconFinish);
113
+ GEvent.addListener(mFinish, "click", function() {
114
+ mFinish.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Finish!</b></td></tr><tr><td>Distance: </td><td>1.36020710502239</td></tr><tr><td>Time of Day: </td><td>2007-01-10T23:07:36Z </td></tr><tr><td>Elapsed Time: </td><td>00:22:42 </td></tr><tr><td>Average Pace: </td><td>16:41.3 </td></tr><tr><td>Lat/Lng: </td><td>35.49545 , -80.83225 </td></tr><tr><td>Altitude: </td><td>241.909m </td></tr></table>");
115
+ });
116
+ map.addOverlay(mFinish);
117
+
118
+
119
+
120
+
121
+ GEvent.addListener(map, "click", function() {
122
+ var center = map.getCenter();
123
+
124
+ document.getElementById("messages").innerHTML = 'click: ' + center.toString();
125
+ });
126
+ GEvent.addListener(map, "moveend", function() {
127
+ var center = map.getCenter();
128
+
129
+ document.getElementById("messages").innerHTML = 'moveend: ' + center.toString();
130
+ });
131
+
132
+ }
133
+ }
134
+ //]]>
135
+
136
+ </script>
137
+ </head>
138
+ <body onload="load()" onunload="GUnload()">
139
+ <center>
140
+ <h3> Google Map created with Gooby </h3>
141
+ <h5> Generated by Gooby Sun Feb 25 11:06:44 EST 2007 <br> Gooby = Google APIs + Ruby </h5>
142
+ <div id="map" style="width: 900px; height: 600px"></div>
143
+ <div id="messages"></div>
144
+ </center>
145
+ </body>
146
+ </html>
@@ -0,0 +1,298 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
6
+ <title> Google Map by Gooby </title>
7
+ <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAdn5SVzjZKZKs1IRkFdx52xQg0TO_bCqGOTsRH2RbuhBZnI0wvRQW0Q92mw1taN1NJCk2cxlQQutfuA" type="text/javascript"></script>
8
+ <script type="text/javascript">
9
+ //<![CDATA[
10
+ function load() {
11
+ if (GBrowserIsCompatible()) {
12
+ var map = new GMap2(document.getElementById("map"));
13
+ map.addControl(new GLargeMapControl());
14
+ map.addControl(new GMapTypeControl());
15
+
16
+ var centerPoint = new GLatLng(35.47866, -80.80853);
17
+ map.setCenter(centerPoint, 13);
18
+
19
+
20
+ var points = new Array();
21
+ points.push(new GLatLng(35.49547,-80.83215)); // 1 (1 of 483.0) 2007-02-24T15:01:34Z 0 00:00:00 0.0
22
+ points.push(new GLatLng(35.49528,-80.83148)); // 2 (5 of 483.0) 2007-02-24T15:01:55Z 21 00:00:21 0.0399748841033102
23
+ points.push(new GLatLng(35.49507,-80.83051)); // 3 (9 of 483.0) 2007-02-24T15:02:23Z 49 00:00:49 0.100038051317954
24
+ points.push(new GLatLng(35.49474,-80.82963)); // 4 (13 of 483.0) 2007-02-24T15:02:50Z 76 00:01:16 0.155134121143229
25
+ points.push(new GLatLng(35.49408,-80.82998)); // 5 (17 of 483.0) 2007-02-24T15:03:14Z 100 00:01:40 0.204995738927677
26
+ points.push(new GLatLng(35.49356,-80.82852)); // 6 (21 of 483.0) 2007-02-24T15:03:57Z 143 00:02:23 0.302846491672981
27
+ points.push(new GLatLng(35.49292,-80.82646)); // 7 (25 of 483.0) 2007-02-24T15:04:59Z 205 00:03:25 0.426966759000703
28
+ points.push(new GLatLng(35.49234,-80.82453)); // 8 (29 of 483.0) 2007-02-24T15:06:00Z 266 00:04:26 0.543147505252162
29
+ points.push(new GLatLng(35.4914,-80.82275)); // 9 (33 of 483.0) 2007-02-24T15:07:08Z 334 00:05:34 0.667007698728487
30
+ points.push(new GLatLng(35.49022,-80.82335)); // 10 (37 of 483.0) 2007-02-24T15:07:54Z 380 00:06:20 0.761061410955272
31
+ points.push(new GLatLng(35.48985,-80.82408)); // 11 (41 of 483.0) 2007-02-24T15:08:22Z 408 00:06:48 0.818788357231371
32
+ points.push(new GLatLng(35.48923,-80.82382)); // 12 (45 of 483.0) 2007-02-24T15:08:50Z 436 00:07:16 0.865855646619916
33
+ points.push(new GLatLng(35.4879,-80.82436)); // 13 (49 of 483.0) 2007-02-24T15:09:52Z 498 00:08:18 0.967795915606254
34
+ points.push(new GLatLng(35.48769,-80.82496)); // 14 (51 of 483.0) 2007-02-24T15:10:13Z 519 00:08:39 1.00559696374205 1.0 00:08:39
35
+ points.push(new GLatLng(35.48865,-80.82618)); // 15 (55 of 483.0) 2007-02-24T15:11:04Z 570 00:09:30 1.10690104869476
36
+ points.push(new GLatLng(35.48932,-80.82723)); // 16 (59 of 483.0) 2007-02-24T15:11:43Z 609 00:10:09 1.18420915035186
37
+ points.push(new GLatLng(35.48876,-80.82734)); // 17 (63 of 483.0) 2007-02-24T15:12:05Z 631 00:10:31 1.22750875619511
38
+ points.push(new GLatLng(35.48753,-80.82562)); // 18 (67 of 483.0) 2007-02-24T15:13:10Z 696 00:11:36 1.35658711847051
39
+ points.push(new GLatLng(35.48657,-80.82406)); // 19 (71 of 483.0) 2007-02-24T15:14:08Z 754 00:12:34 1.46662978485895
40
+ points.push(new GLatLng(35.48575,-80.82275)); // 20 (75 of 483.0) 2007-02-24T15:14:57Z 803 00:13:23 1.55965047980056
41
+ points.push(new GLatLng(35.4852,-80.82185)); // 21 (79 of 483.0) 2007-02-24T15:15:30Z 836 00:13:56 1.62299152262794
42
+ points.push(new GLatLng(35.48464,-80.82092)); // 22 (83 of 483.0) 2007-02-24T15:16:04Z 870 00:14:30 1.68807126170078
43
+ points.push(new GLatLng(35.48389,-80.82021)); // 23 (87 of 483.0) 2007-02-24T15:16:37Z 903 00:15:03 1.75475122366286
44
+ points.push(new GLatLng(35.48215,-80.82017)); // 24 (91 of 483.0) 2007-02-24T15:17:39Z 965 00:16:05 1.8753382959152
45
+ points.push(new GLatLng(35.48035,-80.81991)); // 25 (94 of 483.0) 2007-02-24T15:18:41Z 1027 00:17:07 2.00117121235262 2.0 00:08:28
46
+ points.push(new GLatLng(35.47837,-80.81966)); // 26 (98 of 483.0) 2007-02-24T15:19:52Z 1098 00:18:18 2.13898915519848
47
+ points.push(new GLatLng(35.47803,-80.81925)); // 27 (102 of 483.0) 2007-02-24T15:20:09Z 1115 00:18:35 2.17264599176544
48
+ points.push(new GLatLng(35.47775,-80.81745)); // 28 (106 of 483.0) 2007-02-24T15:21:03Z 1169 00:19:29 2.27593903594574
49
+ points.push(new GLatLng(35.47719,-80.81599)); // 29 (110 of 483.0) 2007-02-24T15:21:50Z 1216 00:20:16 2.36702312184179
50
+ points.push(new GLatLng(35.47681,-80.81399)); // 30 (114 of 483.0) 2007-02-24T15:22:51Z 1277 00:21:17 2.48307793572901
51
+ points.push(new GLatLng(35.47661,-80.81217)); // 31 (118 of 483.0) 2007-02-24T15:23:45Z 1331 00:22:11 2.58648277974409
52
+ points.push(new GLatLng(35.47636,-80.8103)); // 32 (122 of 483.0) 2007-02-24T15:24:41Z 1387 00:23:07 2.69331443478823
53
+ points.push(new GLatLng(35.47597,-80.80852)); // 33 (126 of 483.0) 2007-02-24T15:25:37Z 1443 00:24:03 2.79746202439714
54
+ points.push(new GLatLng(35.47492,-80.80715)); // 34 (130 of 483.0) 2007-02-24T15:26:33Z 1499 00:24:59 2.90451809253227
55
+ points.push(new GLatLng(35.47436,-80.80794)); // 35 (134 of 483.0) 2007-02-24T15:27:04Z 1530 00:25:30 2.97107572761722
56
+ points.push(new GLatLng(35.4741,-80.80841)); // 36 (135 of 483.0) 2007-02-24T15:27:21Z 1547 00:25:47 3.00304457037395 3.0 00:08:40
57
+ points.push(new GLatLng(35.47254,-80.8088)); // 37 (139 of 483.0) 2007-02-24T15:28:19Z 1605 00:26:45 3.11858562491912
58
+ points.push(new GLatLng(35.47099,-80.80953)); // 38 (143 of 483.0) 2007-02-24T15:29:23Z 1669 00:27:49 3.24455598395287
59
+ points.push(new GLatLng(35.47039,-80.80985)); // 39 (147 of 483.0) 2007-02-24T15:29:55Z 1701 00:28:21 3.3095941770986
60
+ points.push(new GLatLng(35.46934,-80.80899)); // 40 (151 of 483.0) 2007-02-24T15:30:46Z 1752 00:29:12 3.39780318387594
61
+ points.push(new GLatLng(35.46844,-80.80786)); // 41 (155 of 483.0) 2007-02-24T15:31:35Z 1801 00:30:01 3.48676290844946
62
+ points.push(new GLatLng(35.46741,-80.80743)); // 42 (159 of 483.0) 2007-02-24T15:32:19Z 1845 00:30:45 3.56701057388963
63
+ points.push(new GLatLng(35.46721,-80.80805)); // 43 (163 of 483.0) 2007-02-24T15:32:45Z 1871 00:31:11 3.61474180038626
64
+ points.push(new GLatLng(35.46633,-80.80936)); // 44 (167 of 483.0) 2007-02-24T15:33:35Z 1921 00:32:01 3.71326479395841
65
+ points.push(new GLatLng(35.4647,-80.80897)); // 45 (171 of 483.0) 2007-02-24T15:34:31Z 1977 00:32:57 3.82858565737502
66
+ points.push(new GLatLng(35.46436,-80.80899)); // 46 (175 of 483.0) 2007-02-24T15:34:45Z 1991 00:33:11 3.85238715261083
67
+ points.push(new GLatLng(35.46348,-80.80843)); // 47 (179 of 483.0) 2007-02-24T15:35:21Z 2027 00:33:47 3.92478275899781
68
+ points.push(new GLatLng(35.46275,-80.80713)); // 48 (182 of 483.0) 2007-02-24T15:36:05Z 2071 00:34:31 4.01377699568254 4.0 00:08:44
69
+ points.push(new GLatLng(35.46168,-80.80537)); // 49 (186 of 483.0) 2007-02-24T15:37:09Z 2135 00:35:35 4.13743880501988
70
+ points.push(new GLatLng(35.462,-80.80371)); // 50 (190 of 483.0) 2007-02-24T15:38:05Z 2191 00:36:31 4.24155070636413
71
+ points.push(new GLatLng(35.46258,-80.802)); // 51 (194 of 483.0) 2007-02-24T15:39:00Z 2246 00:37:26 4.3477818602812
72
+ points.push(new GLatLng(35.46211,-80.7997)); // 52 (198 of 483.0) 2007-02-24T15:40:14Z 2320 00:38:40 4.48258195657805
73
+ points.push(new GLatLng(35.46316,-80.79824)); // 53 (202 of 483.0) 2007-02-24T15:41:10Z 2376 00:39:36 4.59318610915873
74
+ points.push(new GLatLng(35.46376,-80.7964)); // 54 (206 of 483.0) 2007-02-24T15:42:08Z 2434 00:40:34 4.70633339451231
75
+ points.push(new GLatLng(35.46498,-80.79526)); // 55 (210 of 483.0) 2007-02-24T15:43:05Z 2491 00:41:31 4.81264587153351
76
+ points.push(new GLatLng(35.46627,-80.7929)); // 56 (214 of 483.0) 2007-02-24T15:44:26Z 2572 00:42:52 4.9726720892264
77
+ points.push(new GLatLng(35.46653,-80.79247)); // 57 (215 of 483.0) 2007-02-24T15:44:42Z 2588 00:43:08 5.00280757465046 5.0 00:08:37
78
+ points.push(new GLatLng(35.46762,-80.79073)); // 58 (219 of 483.0) 2007-02-24T15:45:47Z 2653 00:44:13 5.12749289225575
79
+ points.push(new GLatLng(35.46936,-80.79015)); // 59 (223 of 483.0) 2007-02-24T15:46:58Z 2724 00:45:24 5.2580508603324
80
+ points.push(new GLatLng(35.47003,-80.78923)); // 60 (227 of 483.0) 2007-02-24T15:47:50Z 2776 00:46:16 5.35295316277639
81
+ points.push(new GLatLng(35.46945,-80.787)); // 61 (231 of 483.0) 2007-02-24T15:48:58Z 2844 00:47:24 5.48496716282651
82
+ points.push(new GLatLng(35.46887,-80.78535)); // 62 (235 of 483.0) 2007-02-24T15:50:00Z 2906 00:48:26 5.58842105005501
83
+ points.push(new GLatLng(35.46923,-80.78427)); // 63 (239 of 483.0) 2007-02-24T15:50:42Z 2948 00:49:08 5.66361452970501
84
+ points.push(new GLatLng(35.46829,-80.78344)); // 64 (243 of 483.0) 2007-02-24T15:51:24Z 2990 00:49:50 5.74363752180409
85
+ points.push(new GLatLng(35.46698,-80.78301)); // 65 (247 of 483.0) 2007-02-24T15:52:15Z 3041 00:50:41 5.83952581970359
86
+ points.push(new GLatLng(35.46649,-80.78363)); // 66 (251 of 483.0) 2007-02-24T15:52:51Z 3077 00:51:17 5.91314816303378
87
+ points.push(new GLatLng(35.46704,-80.78517)); // 67 (255 of 483.0) 2007-02-24T15:53:40Z 3126 00:52:06 6.01100932616663 6.0 00:08:58
88
+ points.push(new GLatLng(35.46779,-80.78447)); // 68 (259 of 483.0) 2007-02-24T15:54:17Z 3163 00:52:43 6.07744016255746
89
+ points.push(new GLatLng(35.46848,-80.78359)); // 69 (263 of 483.0) 2007-02-24T15:54:55Z 3201 00:53:21 6.14646215945301
90
+ points.push(new GLatLng(35.46945,-80.78447)); // 70 (267 of 483.0) 2007-02-24T15:55:35Z 3241 00:54:01 6.23001060242221
91
+ points.push(new GLatLng(35.46872,-80.78558)); // 71 (271 of 483.0) 2007-02-24T15:56:12Z 3278 00:54:38 6.31340204289986
92
+ points.push(new GLatLng(35.46921,-80.78702)); // 72 (275 of 483.0) 2007-02-24T15:56:58Z 3324 00:55:24 6.40732471480835
93
+ points.push(new GLatLng(35.46968,-80.78839)); // 73 (279 of 483.0) 2007-02-24T15:57:38Z 3364 00:56:04 6.49193255121222
94
+ points.push(new GLatLng(35.4699,-80.79009)); // 74 (283 of 483.0) 2007-02-24T15:58:31Z 3417 00:56:57 6.58896117559204
95
+ points.push(new GLatLng(35.4693,-80.79022)); // 75 (287 of 483.0) 2007-02-24T15:58:52Z 3438 00:57:18 6.63366276521022
96
+ points.push(new GLatLng(35.4676,-80.7905)); // 76 (291 of 483.0) 2007-02-24T15:59:56Z 3502 00:58:22 6.75453438981197
97
+ points.push(new GLatLng(35.467,-80.7915)); // 77 (295 of 483.0) 2007-02-24T16:00:37Z 3543 00:59:03 6.830505688898
98
+ points.push(new GLatLng(35.46786,-80.79314)); // 78 (299 of 483.0) 2007-02-24T16:01:34Z 3600 01:00:00 6.94247622743239
99
+ points.push(new GLatLng(35.46767,-80.79401)); // 79 (303 of 483.0) 2007-02-24T16:02:15Z 3641 01:00:41 6.99392316548983
100
+ points.push(new GLatLng(35.46762,-80.79412)); // 80 (304 of 483.0) 2007-02-24T16:02:22Z 3648 01:00:48 7.00101145642195 7.0 00:08:42
101
+ points.push(new GLatLng(35.46689,-80.7953)); // 81 (308 of 483.0) 2007-02-24T16:03:14Z 3700 01:01:40 7.08491236743126
102
+ points.push(new GLatLng(35.46569,-80.7968)); // 82 (312 of 483.0) 2007-02-24T16:04:15Z 3761 01:02:41 7.20353775622196
103
+ points.push(new GLatLng(35.46488,-80.79876)); // 83 (316 of 483.0) 2007-02-24T16:05:18Z 3824 01:03:44 7.33411098315705
104
+ points.push(new GLatLng(35.46458,-80.80088)); // 84 (320 of 483.0) 2007-02-24T16:06:21Z 3887 01:04:47 7.45528455456418
105
+ points.push(new GLatLng(35.46488,-80.80268)); // 85 (324 of 483.0) 2007-02-24T16:07:17Z 3943 01:05:43 7.56274052568667
106
+ points.push(new GLatLng(35.46569,-80.80438)); // 86 (328 of 483.0) 2007-02-24T16:08:21Z 4007 01:06:47 7.67626707626418
107
+ points.push(new GLatLng(35.46603,-80.80627)); // 87 (332 of 483.0) 2007-02-24T16:09:18Z 4064 01:07:44 7.78698149251573
108
+ points.push(new GLatLng(35.46743,-80.80734)); // 88 (336 of 483.0) 2007-02-24T16:10:22Z 4128 01:08:48 7.90388515476893
109
+ points.push(new GLatLng(35.46831,-80.80768)); // 89 (340 of 483.0) 2007-02-24T16:10:56Z 4162 01:09:22 7.96772866571436
110
+ points.push(new GLatLng(35.46887,-80.80826)); // 90 (342 of 483.0) 2007-02-24T16:11:21Z 4187 01:09:47 8.01841460629545 8.0 00:08:59
111
+ points.push(new GLatLng(35.4699,-80.80949)); // 91 (346 of 483.0) 2007-02-24T16:12:14Z 4240 01:10:40 8.11897089142943
112
+ points.push(new GLatLng(35.47069,-80.80996)); // 92 (350 of 483.0) 2007-02-24T16:12:45Z 4271 01:11:11 8.18606818725022
113
+ points.push(new GLatLng(35.47129,-80.8094)); // 93 (354 of 483.0) 2007-02-24T16:13:19Z 4305 01:11:45 8.24796779442767
114
+ points.push(new GLatLng(35.47279,-80.80878)); // 94 (358 of 483.0) 2007-02-24T16:14:21Z 4367 01:12:47 8.36157476646559
115
+ points.push(new GLatLng(35.47419,-80.80852)); // 95 (362 of 483.0) 2007-02-24T16:15:18Z 4424 01:13:44 8.46032336598752
116
+ points.push(new GLatLng(35.47466,-80.80736)); // 96 (366 of 483.0) 2007-02-24T16:16:02Z 4468 01:14:28 8.53394305647851
117
+ points.push(new GLatLng(35.47522,-80.80745)); // 97 (370 of 483.0) 2007-02-24T16:16:31Z 4497 01:14:57 8.58789117025616
118
+ points.push(new GLatLng(35.47614,-80.80884)); // 98 (374 of 483.0) 2007-02-24T16:17:25Z 4551 01:15:51 8.68990045232099
119
+ points.push(new GLatLng(35.47631,-80.81064)); // 99 (378 of 483.0) 2007-02-24T16:18:20Z 4606 01:16:46 8.79199290028689
120
+ points.push(new GLatLng(35.47653,-80.81228)); // 100 (382 of 483.0) 2007-02-24T16:19:12Z 4658 01:17:38 8.88563077147677
121
+ points.push(new GLatLng(35.47672,-80.81408)); // 101 (386 of 483.0) 2007-02-24T16:20:08Z 4714 01:18:34 8.98797360764235
122
+ points.push(new GLatLng(35.47676,-80.81459)); // 102 (387 of 483.0) 2007-02-24T16:20:23Z 4729 01:18:49 9.01680080206323 9.0 00:09:02
123
+ points.push(new GLatLng(35.47724,-80.81648)); // 103 (391 of 483.0) 2007-02-24T16:21:20Z 4786 01:19:46 9.12833050426861
124
+ points.push(new GLatLng(35.47788,-80.81813)); // 104 (395 of 483.0) 2007-02-24T16:22:16Z 4842 01:20:42 9.23131767604398
125
+ points.push(new GLatLng(35.47812,-80.8194)); // 105 (399 of 483.0) 2007-02-24T16:22:57Z 4883 01:21:23 9.30602330998462
126
+ points.push(new GLatLng(35.47904,-80.81974)); // 106 (403 of 483.0) 2007-02-24T16:23:33Z 4919 01:21:59 9.37408259683331
127
+ points.push(new GLatLng(35.47987,-80.81976)); // 107 (407 of 483.0) 2007-02-24T16:24:03Z 4949 01:22:29 9.43147533561232
128
+ points.push(new GLatLng(35.48084,-80.81983)); // 108 (411 of 483.0) 2007-02-24T16:24:39Z 4985 01:23:05 9.49923565098337
129
+ points.push(new GLatLng(35.48161,-80.82013)); // 109 (415 of 483.0) 2007-02-24T16:25:09Z 5015 01:23:35 9.55593836096769
130
+ points.push(new GLatLng(35.48301,-80.82015)); // 110 (419 of 483.0) 2007-02-24T16:26:00Z 5066 01:24:26 9.65268451031916
131
+ points.push(new GLatLng(35.48406,-80.82028)); // 111 (423 of 483.0) 2007-02-24T16:26:39Z 5105 01:25:05 9.72605795435558
132
+ points.push(new GLatLng(35.48485,-80.82122)); // 112 (427 of 483.0) 2007-02-24T16:27:18Z 5144 01:25:44 9.80291841868053
133
+ points.push(new GLatLng(35.48554,-80.8224)); // 113 (431 of 483.0) 2007-02-24T16:28:01Z 5187 01:26:27 9.88479652023882
134
+ points.push(new GLatLng(35.4864,-80.82373)); // 114 (435 of 483.0) 2007-02-24T16:28:51Z 5237 01:27:17 9.98041175465099
135
+ points.push(new GLatLng(35.48659,-80.82406)); // 115 (436 of 483.0) 2007-02-24T16:29:02Z 5248 01:27:28 10.003148707901 10.0 00:08:39
136
+ points.push(new GLatLng(35.48741,-80.82541)); // 116 (440 of 483.0) 2007-02-24T16:29:50Z 5296 01:28:16 10.0979052624487
137
+ points.push(new GLatLng(35.48807,-80.82654)); // 117 (444 of 483.0) 2007-02-24T16:30:29Z 5335 01:28:55 10.1762549895051
138
+ points.push(new GLatLng(35.48893,-80.82783)); // 118 (448 of 483.0) 2007-02-24T16:31:17Z 5383 01:29:43 10.2702027321813
139
+ points.push(new GLatLng(35.48981,-80.82929)); // 119 (452 of 483.0) 2007-02-24T16:32:12Z 5438 01:30:38 10.3724048009491
140
+ points.push(new GLatLng(35.49073,-80.83075)); // 120 (456 of 483.0) 2007-02-24T16:33:06Z 5492 01:31:32 10.4767111646638
141
+ points.push(new GLatLng(35.49153,-80.83193)); // 121 (460 of 483.0) 2007-02-24T16:33:50Z 5536 01:32:16 10.5632037195685
142
+ points.push(new GLatLng(35.49208,-80.83193)); // 122 (464 of 483.0) 2007-02-24T16:34:13Z 5559 01:32:39 10.6081835447671
143
+ points.push(new GLatLng(35.49277,-80.83169)); // 123 (468 of 483.0) 2007-02-24T16:34:49Z 5595 01:33:15 10.6735174477256
144
+ points.push(new GLatLng(35.49378,-80.83298)); // 124 (472 of 483.0) 2007-02-24T16:35:41Z 5647 01:34:07 10.7751815894241
145
+ points.push(new GLatLng(35.49462,-80.83405)); // 125 (476 of 483.0) 2007-02-24T16:36:22Z 5688 01:34:48 10.8590710474848
146
+ points.push(new GLatLng(35.49577,-80.83279)); // 126 (480 of 483.0) 2007-02-24T16:37:08Z 5734 01:35:34 10.9656437902475
147
+ points.push(new GLatLng(35.49554,-80.83215)); // 127 (483 of 483.0) 2007-02-24T16:37:27Z 5753 01:35:53 11.0052286461428 11.0 00:08:25
148
+
149
+ var routePolyline = new GPolyline(points);
150
+ map.addOverlay(routePolyline);
151
+
152
+ // Create a base icon for all of our markers that specifies the
153
+ // shadow, icon dimensions, etc.
154
+ var baseIcon = new GIcon();
155
+ baseIcon.shadow = "http://www.joakim-systems.com/gicons/shadow50.png";
156
+ baseIcon.iconSize = new GSize(20, 34);
157
+ baseIcon.shadowSize = new GSize(37, 34);
158
+ baseIcon.iconAnchor = new GPoint(9, 34);
159
+ baseIcon.infoWindowAnchor = new GPoint(9, 2);
160
+ baseIcon.infoShadowAnchor = new GPoint(18, 25);
161
+
162
+ var iconStart = new GIcon(baseIcon);
163
+ iconStart.image = "http://www.joakim-systems.com/gicons/dd-start.png";
164
+ var pStart = new GPoint(-80.83215, 35.49547);
165
+ var mStart = new GMarker(pStart, iconStart);
166
+ GEvent.addListener(mStart, "click", function() {
167
+ mStart.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Start!</b></td></tr><tr><td>Distance: </td><td>0.0</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:01:34Z </td></tr><tr><td>Elapsed Time: </td><td>00:00:00 </td></tr><tr><td>Average Pace: </td><td> </td></tr><tr><td>Lat/Lng: </td><td>35.49547 , -80.83215 </td></tr><tr><td>Altitude: </td><td>240.467m </td></tr></table>");
168
+ });
169
+ map.addOverlay(mStart);
170
+
171
+ var icon1 = new GIcon(baseIcon);
172
+ icon1.image = "http://www.joakim-systems.com/gicons/marker1.png";
173
+ var p1 = new GPoint(-80.82496, 35.48769);
174
+ var m1 = new GMarker(p1, icon1);
175
+ GEvent.addListener(m1, "click", function() {
176
+ m1.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 1</b></td></tr><tr><td>Distance: </td><td>1.00559696374205</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:10:13Z </td></tr><tr><td>Elapsed Time: </td><td>00:08:39 </td></tr><tr><td>Average Pace: </td><td>8:36.1 </td></tr><tr><td>Lat/Lng: </td><td>35.48769 , -80.82496 </td></tr><tr><td>Altitude: </td><td>228.45m </td></tr></table>");
177
+ });
178
+ map.addOverlay(m1);
179
+
180
+ var icon2 = new GIcon(baseIcon);
181
+ icon2.image = "http://www.joakim-systems.com/gicons/marker2.png";
182
+ var p2 = new GPoint(-80.81991, 35.48035);
183
+ var m2 = new GMarker(p2, icon2);
184
+ GEvent.addListener(m2, "click", function() {
185
+ m2.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 2</b></td></tr><tr><td>Distance: </td><td>2.00117121235262</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:18:41Z </td></tr><tr><td>Elapsed Time: </td><td>00:17:07 </td></tr><tr><td>Average Pace: </td><td>8:33.2 </td></tr><tr><td>Lat/Lng: </td><td>35.48035 , -80.81991 </td></tr><tr><td>Altitude: </td><td>234.218m </td></tr></table>");
186
+ });
187
+ map.addOverlay(m2);
188
+
189
+ var icon3 = new GIcon(baseIcon);
190
+ icon3.image = "http://www.joakim-systems.com/gicons/marker3.png";
191
+ var p3 = new GPoint(-80.80841, 35.4741);
192
+ var m3 = new GMarker(p3, icon3);
193
+ GEvent.addListener(m3, "click", function() {
194
+ m3.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 3</b></td></tr><tr><td>Distance: </td><td>3.00304457037395</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:27:21Z </td></tr><tr><td>Elapsed Time: </td><td>00:25:47 </td></tr><tr><td>Average Pace: </td><td>8:35.1 </td></tr><tr><td>Lat/Lng: </td><td>35.4741 , -80.80841 </td></tr><tr><td>Altitude: </td><td>215.953m </td></tr></table>");
195
+ });
196
+ map.addOverlay(m3);
197
+
198
+ var icon4 = new GIcon(baseIcon);
199
+ icon4.image = "http://www.joakim-systems.com/gicons/marker4.png";
200
+ var p4 = new GPoint(-80.80713, 35.46275);
201
+ var m4 = new GMarker(p4, icon4);
202
+ GEvent.addListener(m4, "click", function() {
203
+ m4.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 4</b></td></tr><tr><td>Distance: </td><td>4.01377699568254</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:36:05Z </td></tr><tr><td>Elapsed Time: </td><td>00:34:31 </td></tr><tr><td>Average Pace: </td><td>8:36.0 </td></tr><tr><td>Lat/Lng: </td><td>35.46275 , -80.80713 </td></tr><tr><td>Altitude: </td><td>212.108m </td></tr></table>");
204
+ });
205
+ map.addOverlay(m4);
206
+
207
+ var icon5 = new GIcon(baseIcon);
208
+ icon5.image = "http://www.joakim-systems.com/gicons/marker5.png";
209
+ var p5 = new GPoint(-80.79247, 35.46653);
210
+ var m5 = new GMarker(p5, icon5);
211
+ GEvent.addListener(m5, "click", function() {
212
+ m5.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 5</b></td></tr><tr><td>Distance: </td><td>5.00280757465046</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:44:42Z </td></tr><tr><td>Elapsed Time: </td><td>00:43:08 </td></tr><tr><td>Average Pace: </td><td>8:37.3 </td></tr><tr><td>Lat/Lng: </td><td>35.46653 , -80.79247 </td></tr><tr><td>Altitude: </td><td>208.743m </td></tr></table>");
213
+ });
214
+ map.addOverlay(m5);
215
+
216
+ var icon6 = new GIcon(baseIcon);
217
+ icon6.image = "http://www.joakim-systems.com/gicons/marker6.png";
218
+ var p6 = new GPoint(-80.78517, 35.46704);
219
+ var m6 = new GMarker(p6, icon6);
220
+ GEvent.addListener(m6, "click", function() {
221
+ m6.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 6</b></td></tr><tr><td>Distance: </td><td>6.01100932616663</td></tr><tr><td>Time of Day: </td><td>2007-02-24T15:53:40Z </td></tr><tr><td>Elapsed Time: </td><td>00:52:06 </td></tr><tr><td>Average Pace: </td><td>8:40.0 </td></tr><tr><td>Lat/Lng: </td><td>35.46704 , -80.78517 </td></tr><tr><td>Altitude: </td><td>213.069m </td></tr></table>");
222
+ });
223
+ map.addOverlay(m6);
224
+
225
+ var icon7 = new GIcon(baseIcon);
226
+ icon7.image = "http://www.joakim-systems.com/gicons/marker7.png";
227
+ var p7 = new GPoint(-80.79412, 35.46762);
228
+ var m7 = new GMarker(p7, icon7);
229
+ GEvent.addListener(m7, "click", function() {
230
+ m7.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 7</b></td></tr><tr><td>Distance: </td><td>7.00101145642195</td></tr><tr><td>Time of Day: </td><td>2007-02-24T16:02:22Z </td></tr><tr><td>Elapsed Time: </td><td>01:00:48 </td></tr><tr><td>Average Pace: </td><td>8:41.1 </td></tr><tr><td>Lat/Lng: </td><td>35.46762 , -80.79412 </td></tr><tr><td>Altitude: </td><td>203.937m </td></tr></table>");
231
+ });
232
+ map.addOverlay(m7);
233
+
234
+ var icon8 = new GIcon(baseIcon);
235
+ icon8.image = "http://www.joakim-systems.com/gicons/marker8.png";
236
+ var p8 = new GPoint(-80.80826, 35.46887);
237
+ var m8 = new GMarker(p8, icon8);
238
+ GEvent.addListener(m8, "click", function() {
239
+ m8.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 8</b></td></tr><tr><td>Distance: </td><td>8.01841460629545</td></tr><tr><td>Time of Day: </td><td>2007-02-24T16:11:21Z </td></tr><tr><td>Elapsed Time: </td><td>01:09:47 </td></tr><tr><td>Average Pace: </td><td>8:42.2 </td></tr><tr><td>Lat/Lng: </td><td>35.46887 , -80.80826 </td></tr><tr><td>Altitude: </td><td>212.589m </td></tr></table>");
240
+ });
241
+ map.addOverlay(m8);
242
+
243
+ var icon9 = new GIcon(baseIcon);
244
+ icon9.image = "http://www.joakim-systems.com/gicons/marker9.png";
245
+ var p9 = new GPoint(-80.81459, 35.47676);
246
+ var m9 = new GMarker(p9, icon9);
247
+ GEvent.addListener(m9, "click", function() {
248
+ m9.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 9</b></td></tr><tr><td>Distance: </td><td>9.01680080206323</td></tr><tr><td>Time of Day: </td><td>2007-02-24T16:20:23Z </td></tr><tr><td>Elapsed Time: </td><td>01:18:49 </td></tr><tr><td>Average Pace: </td><td>8:44.5 </td></tr><tr><td>Lat/Lng: </td><td>35.47676 , -80.81459 </td></tr><tr><td>Altitude: </td><td>214.031m </td></tr></table>");
249
+ });
250
+ map.addOverlay(m9);
251
+
252
+ var icon10 = new GIcon(baseIcon);
253
+ icon10.image = "http://www.joakim-systems.com/gicons/marker10.png";
254
+ var p10 = new GPoint(-80.82406, 35.48659);
255
+ var m10 = new GMarker(p10, icon10);
256
+ GEvent.addListener(m10, "click", function() {
257
+ m10.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Checkpoint 10</b></td></tr><tr><td>Distance: </td><td>10.003148707901</td></tr><tr><td>Time of Day: </td><td>2007-02-24T16:29:02Z </td></tr><tr><td>Elapsed Time: </td><td>01:27:28 </td></tr><tr><td>Average Pace: </td><td>8:44.6 </td></tr><tr><td>Lat/Lng: </td><td>35.48659 , -80.82406 </td></tr><tr><td>Altitude: </td><td>231.334m </td></tr></table>");
258
+ });
259
+ map.addOverlay(m10);
260
+
261
+ var iconFinish = new GIcon(baseIcon);
262
+ iconFinish.image = "http://www.joakim-systems.com/gicons/dd-end.png";
263
+ var pFinish = new GPoint(-80.83215, 35.49554);
264
+ var mFinish = new GMarker(pFinish, iconFinish);
265
+ GEvent.addListener(mFinish, "click", function() {
266
+ mFinish.openInfoWindowHtml("<table align='left'><tr><td colspan='2'><b>Finish!</b></td></tr><tr><td>Distance: </td><td>11.0052286461428</td></tr><tr><td>Time of Day: </td><td>2007-02-24T16:37:27Z </td></tr><tr><td>Elapsed Time: </td><td>01:35:53 </td></tr><tr><td>Average Pace: </td><td>8:42.8 </td></tr><tr><td>Lat/Lng: </td><td>35.49554 , -80.83215 </td></tr><tr><td>Altitude: </td><td>241.428m </td></tr></table>");
267
+ });
268
+ map.addOverlay(mFinish);
269
+
270
+
271
+
272
+
273
+ GEvent.addListener(map, "click", function() {
274
+ var center = map.getCenter();
275
+
276
+ document.getElementById("messages").innerHTML = 'click: ' + center.toString();
277
+ });
278
+ GEvent.addListener(map, "moveend", function() {
279
+ var center = map.getCenter();
280
+
281
+ document.getElementById("messages").innerHTML = 'moveend: ' + center.toString();
282
+ });
283
+
284
+ }
285
+ }
286
+ //]]>
287
+
288
+ </script>
289
+ </head>
290
+ <body onload="load()" onunload="GUnload()">
291
+ <center>
292
+ <h3> Google Map created with Gooby </h3>
293
+ <h5> Generated by Gooby Sun Feb 25 09:21:42 EST 2007 <br> Gooby = Google APIs + Ruby </h5>
294
+ <div id="map" style="width: 900px; height: 600px"></div>
295
+ <div id="messages"></div>
296
+ </center>
297
+ </body>
298
+ </html>
@@ -0,0 +1,105 @@
1
+ =begin rdoc
2
+
3
+ Gooby - Copyright 2007 by Chris Joakim.
4
+ Gooby is available under GNU General Public License (GPL) license.
5
+
6
+ =end
7
+
8
+ require 'gooby'
9
+ require 'test/unit'
10
+
11
+ class TestClassCounterHash < Test::Unit::TestCase
12
+
13
+ include Gooby::TestHelper
14
+
15
+ @debug = false
16
+
17
+ ### Start of tests. Keep this line - see class TestGenerator.
18
+
19
+ def test_class_CounterHash
20
+
21
+ # See the method-level tests below.
22
+ end
23
+
24
+ def test_class_CounterHash_decrement
25
+
26
+ cHash = Gooby::CounterHash.new
27
+ 7.times { cHash.decrement("seven") }
28
+ 391.times { cHash.decrement("391") }
29
+ assert(cHash.value('seven') == -7, "decremented value not -7.")
30
+ assert(cHash.value('391') == -391, "decremented value not -391.")
31
+ assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
32
+ end
33
+
34
+ def test_class_CounterHash_increment
35
+
36
+ cHash = Gooby::CounterHash.new
37
+ 33.times { cHash.increment("33") }
38
+ 123.times { cHash.increment("123") }
39
+ assert(cHash.value('33') == 33, "incremented value not 33.")
40
+ assert(cHash.value('123') == 123, "incremented value not 123.")
41
+ assert(cHash.sorted_keys.size == 2, "sorted_keys size is not 2.")
42
+ end
43
+
44
+ def test_class_CounterHash_initialize
45
+
46
+ cHash = Gooby::CounterHash.new
47
+ assert(cHash.value('test') == 0, "initial value is not 0.")
48
+ assert(cHash.sorted_keys.size == 0, "sorted_keys size is not 0.")
49
+ end
50
+
51
+ def test_class_CounterHash_sorted_keys
52
+
53
+ cHash = Gooby::CounterHash.new
54
+ cHash.increment('OS/X')
55
+ cHash.decrement('Windows')
56
+ cHash.increment('Linux')
57
+ array = cHash.sorted_keys
58
+ assert(array.class == Array, "sorted_keys is not an Array; #{array.class}.")
59
+ assert(cHash.sorted_keys.size == 3, "sorted_keys size is not 3.")
60
+ assert(array[0] == 'Linux', "sorted_keys element 0 is incorrect.")
61
+ assert(array[1] == 'OS/X', "sorted_keys element 1 is incorrect.")
62
+ assert(array[2] == 'Windows', "sorted_keys element 2 is incorrect.")
63
+ end
64
+
65
+ def test_class_CounterHash_to_s
66
+
67
+ cHash = Gooby::CounterHash.new
68
+ cHash.increment("romeo")
69
+ cHash.increment("maybelline")
70
+ cHash.decrement("romeo")
71
+ cHash.increment("yingling")
72
+ cHash.increment("maybelline")
73
+ cHash.decrement("domino")
74
+ cHash.increment("yingling")
75
+ cHash.increment("maybelline")
76
+ cHash.increment("leppie")
77
+
78
+ expected = 'CHash: key: [domino] val: [-1] key: [leppie] val: [1] key: [maybelline] val: [3] key: [romeo] val: [0] key: [yingling] val: [2]'
79
+ actual = cHash.to_s
80
+ assert_equal(expected, actual, "to_s value is not as expected; #{actual} vs #{expected}")
81
+ end
82
+
83
+ def test_class_CounterHash_to_xml
84
+
85
+ cHash = Gooby::CounterHash.new
86
+ cHash.increment("romeo")
87
+ cHash.increment("maybelline")
88
+ cHash.decrement("romeo")
89
+ cHash.increment("yingling")
90
+ cHash.increment("maybelline")
91
+ cHash.decrement("domino")
92
+ cHash.increment("yingling")
93
+ cHash.increment("maybelline")
94
+ cHash.increment("leppie")
95
+
96
+ expected = "<CHash> <entry key='domino' value='-1'/> <entry key='leppie' value='1'/> <entry key='maybelline' value='3'/> <entry key='romeo' value='0'/> <entry key='yingling' value='2'/> </CHash>"
97
+ actual = cHash.to_xml(false)
98
+ assert_equal(expected, actual, "to_xml value is not as expected; #{actual} vs #{expected}")
99
+ end
100
+
101
+ def test_class_CounterHash_value
102
+
103
+ # This method is tested in the other test methods.
104
+ end
105
+ end