IGC example
-
Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file. The five tracks contain a total of 49,707 unique coordinates. Zoom in to see more detail. The background layer is from OpenCycleMap .
+
Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file.
+
The five tracks contain a total of 49,707 unique coordinates. Zoom in to see more detail. The background layer is from OpenCycleMap .
See the igc.js source to see how this is done.
diff --git a/examples/localized-openstreetmap.html b/examples/localized-openstreetmap.html
index cdcc3b8f3a..9cbaa26f10 100644
--- a/examples/localized-openstreetmap.html
+++ b/examples/localized-openstreetmap.html
@@ -32,8 +32,9 @@
Localized OpenStreetMap example
-
Example of a localized OpenStreetMap map with a custom tile server and a custom attribution. The base layer is OpenCycleMap with an overlay from OpenSeaMap . The OpenSeaMap tile server does not support CORS headers.
+
Example of a localized OpenStreetMap map with a custom tile server and a custom attribution.
cors, localized-openstreetmap, openseamap, openstreetmap
diff --git a/examples/static-image.html b/examples/static-image.html
index 9dc9142288..0386496bb7 100644
--- a/examples/static-image.html
+++ b/examples/static-image.html
@@ -32,8 +32,9 @@
Static image example
-
Example of a static image layer. Source: xkcd.com/256/
+
Example of a static image layer.
static image, xkcd
diff --git a/examples/tile-vector.html b/examples/tile-vector.html
index e6b7167c85..02784c351c 100644
--- a/examples/tile-vector.html
+++ b/examples/tile-vector.html
@@ -32,7 +32,7 @@
Tile vector example
-
Example of vector tiles from openstreetmap.us .
+
Example of vector tiles from openstreetmap.us.
diff --git a/tasks/parse-examples.js b/tasks/parse-examples.js
index 361d489e6f..0def06131a 100644
--- a/tasks/parse-examples.js
+++ b/tasks/parse-examples.js
@@ -49,21 +49,25 @@ function parseExamples(examplePaths, callback) {
tags: ''
};
var key;
+ var openTag;
var parser = new Parser({
- onopentag: function(name, attrs) {
+ onopentag: function(tag, attrs) {
if (attrs.id in info) {
key = attrs.id;
- } else {
- key = undefined;
+ openTag = tag;
}
},
ontext: function(text) {
if (key) {
- info[key] = text.replace(/\n/g, '').trim();
+ info[key] += text.replace(/\n/g, '').trim() + ' ';
}
},
- onclosetag: function(name) {
- key = undefined;
+ onclosetag: function(tag) {
+ if (tag === openTag) {
+ info[key] = info[key].trim();
+ key = undefined;
+ openTag = undefined;
+ }
},
onerror: function(err2) {
var message = 'Trouble parsing ' + examplePath + '\n' + err2.message;