summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demo5.html8
-rw-r--r--demo6.html8
-rw-r--r--index.html17
3 files changed, 31 insertions, 2 deletions
diff --git a/demo5.html b/demo5.html
index 1e59063..d4f5f05 100644
--- a/demo5.html
+++ b/demo5.html
@@ -35,7 +35,13 @@
// Load some GeoJSON exported from OpenStreetMap using the OverpassAPI
// (http://overpass-turbo.eu/s/7yI)
- getJSON("cafes.json", function(cafes) {
+ var url = "cafes.json";
+
+ if (document.URL.indexOf("file") === 0) {
+ url = "http://cbaines.net/maptime/cafes.json";
+ }
+
+ getJSON(url, function(cafes) {
L.geoJson(cafes).addTo(map);
});
diff --git a/demo6.html b/demo6.html
index da7e434..fd42a78 100644
--- a/demo6.html
+++ b/demo6.html
@@ -41,7 +41,13 @@
popupAnchor: [16, 0] // point from which the
});
- getJSON("cafes.json", function(cafes) {
+ var url = "cafes.json";
+
+ if (document.URL.indexOf("file") === 0) {
+ url = "http://cbaines.net/maptime/cafes.json";
+ }
+
+ getJSON(url, function(cafes) {
// Coffee icon from
// http://mapicons.nicolasmollet.com/markers/restaurants-bars/bars/coffee/
diff --git a/index.html b/index.html
index 984edce..74f0d2a 100644
--- a/index.html
+++ b/index.html
@@ -67,6 +67,23 @@
</section>
<section>
+ <h2>Following Along</h2>
+
+ <p>
+ Either download the repository
+ <a href="http://git.cbaines.net/?p=leaflet-workshop.git;a=snapshot;h=HEAD;sf=zip">zip</a>
+ /
+ <a href="http://git.cbaines.net/?p=leaflet-workshop.git;a=snapshot;h=HEAD;sf=tgz">tgz</a>
+ </p>
+
+ <p>
+ Or, clone the repository
+ <br>
+ <a href="http://git.cbaines.net/?p=leaflet-workshop.git;a=summary">git://git.cbaines.net/leaflet-workshop.git</a>
+ </p>
+ </section>
+
+ <section>
<h2>Be prepared to...</h2>
<ul>
<li>Make a basic map</li>