jekyll-webmaps-simple-theme 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69064f80b50dce2a2c6e32fbebd8779f469eb7fc4e34083a19a5315f733da687
4
- data.tar.gz: 15535b618039795c44b16a2428e1b2fc92e318ad53d6c56a3f454ef27775a111
3
+ metadata.gz: 96a853947b6bf0201080d2d6d86c7c8c37c7b97680542532025ee4ab372ef980
4
+ data.tar.gz: 1c9103a6da5d95ed4cbf8a0ee797a783c2f00a251fe6d247b541594d0939c21a
5
5
  SHA512:
6
- metadata.gz: 0c546e628bd0474b9f2c0929b3a6f93250940d41b0ca193c7c038f06922cb673054b8f7b1ceeb26d804fc3b752de1eeaca4ea321faf855be4e617a52e9a63073
7
- data.tar.gz: 53c69d1dd7a7bdf4af43598ccf1a440bd1ea1c41284ce8410f6178906eed337c077f3d2bb3216205156d395b7f25c1cb318bd83f4e0ed0378cd48524217a5738
6
+ metadata.gz: cd8ae01defebdd729e45faa63403e3ef08eba7fea627b1201b4e3a51b3381a7744f7673146886b9dff8e558d5d22c77ef7bcd466fb50ba0e4c7feb4100b08b0d
7
+ data.tar.gz: 98754e24e24648a3777566f4908264d83d1f2cf0e40852cc061a5a3991218fb9758e256e53c842c98c89838a835e765c7d9f95fc625ee25eef2866b95e275c2a
data/_data/mapdata.yml CHANGED
@@ -26,14 +26,13 @@ geojson:
26
26
  feat:
27
27
  - population
28
28
 
29
- polygon:
29
+ polygon:
30
30
  -
31
31
  url: 'assets/data/json/sarawak_admin_dummy.geojson'
32
32
  id: admin
33
33
  name: Administration
34
34
  feat:
35
- - NAME_1
36
- - POP
35
+ - NAME_2
37
36
  line:
38
37
 
39
38
  base:
data/_includes/head.html CHANGED
@@ -15,12 +15,15 @@
15
15
  <!-- - -->
16
16
 
17
17
  <!-- CSS -->
18
- <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
18
+ <link rel="stylesheet" href="{{ site.url }}/assets/css/main.css" type="text/css">
19
+ <link rel="stylesheet" href="{{ site.url }}/assets/css/bootstrap.min.css" type="text/css">
20
+ <link rel="stylesheet" href="{{ site.url }}/assets/css/font-awesome.min.css" type="text/css">
21
+
19
22
  <!-- JS -->
20
- <script src="{{ '/assets/js/jquery.min.js' | relative_url }}"></script>
21
- <script src="{{ '/assets/js/bootstrap.min.js' | relative_url }}"></script>
22
- <script src="{{ '/assets/js/leaflet.js' | relative_url }}"></script>
23
- <script src="{{ '/assets/js/Leaflet.fullscreen.min.js' | relative_url }}"></script>
23
+ <script src="{{ site.url }}/assets/js/jquery.min.js"></script>
24
+ <script src="{{ site.url }}/assets/js/bootstrap.min.js"></script>
25
+ <script src="{{ site.url }}/assets/js/leaflet.js"></script>
26
+ <script src="{{ site.url }}/assets/js/Leaflet.fullscreen.min.js"></script>
24
27
  {% for js in site.data.mapdata.base %}{% if js.extrajs == true %}<script type="text/javascript" src="{{ js.leaflet-js }}"></script>{% endif %}{% endfor %}
25
28
  {% for js in site.data.mapdata.overlay %}{% if js.extrajs == true %}<script type="text/javascript" src="{{ js.leaflet-js }}"></script>{% endif %}{% endfor %}
26
29
 
data/_includes/map.html CHANGED
@@ -50,23 +50,37 @@
50
50
  {% if site.data.mapdata.load_geojson == true %}
51
51
 
52
52
  {% for map in site.data.mapdata.geojson.point %}
53
- function onEachFeature(feature, layer) {
53
+ function onEachPointFeature(feature, layer) {
54
54
  // does this feature have a property named popupContent?
55
- if (feature.properties && feature.properties.population) {
56
- layer.bindPopup(feature.properties.population);
55
+ if (feature.properties && feature.properties.{{ map.feat }}) {
56
+ layer.bindPopup(feature.properties.{{ map.feat }});
57
57
  }
58
58
  }
59
- var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachFeature});
59
+
60
+ var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachPointFeature});
60
61
  $.getJSON("{{ map.url }}", function(data){ {{ map.id }}.addData(data);});
61
62
  {% endfor %}
62
63
 
63
64
  {% for map in site.data.mapdata.geojson.polygon %}
64
- var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachFeature});
65
+ function onEachPolygonFeature(feature, layer) {
66
+ // does this feature have a property named popupContent?
67
+ if (feature.properties && feature.properties.{{ map.feat }}) {
68
+ layer.bindPopup(feature.properties.{{ map.feat }});
69
+ }
70
+ }
71
+
72
+ var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachPolygonFeature});
65
73
  $.getJSON("{{ map.url }}", function(data){ {{ map.id }}.addData(data);});
66
74
  {% endfor %}
67
75
 
68
76
  {% for map in site.data.mapdata.geojson.line %}
69
- var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachFeature});
77
+ function onEachLineFeature(feature, layer) {
78
+ // does this feature have a property named popupContent?
79
+ if (feature.properties && feature.properties.{{ map.feat }}) {
80
+ layer.bindPopup(feature.properties.{{ map.feat }});
81
+ }
82
+ }
83
+ var {{ map.id }}= L.geoJson(null,{onEachFeature: onEachLineFeature});
70
84
  $.getJSON("{{ map.url }}", function(data){ {{ map.id }}.addData(data);});
71
85
  {% endfor %}
72
86
 
@@ -117,4 +131,7 @@
117
131
  map.addControl(new legend());
118
132
 
119
133
  </script>
134
+ <script src="{{ site.url }}/assets/js/jquery.min.js"></script>
135
+ <script src="{{ site.url }}/assets/js/leaflet.js"></script>
136
+ <script src="{{ site.url }}/assets/js/Leaflet.fullscreen.min.js"></script>
120
137
  </div>
@@ -4,16 +4,8 @@
4
4
  {% include head.html %}
5
5
 
6
6
  <body>
7
- {% include header.html %}
8
7
 
9
- <!-- {% include fork_me.html %} -->
8
+ {{ content }}
10
9
 
11
- {% include about.html %}
12
-
13
- {% include contact.html %}
14
-
15
- {{ content }}
16
-
17
- {% include map.html %}
18
10
  </body>
19
11
  </html>
data/_layouts/page.html CHANGED
@@ -1,5 +1,3 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
-
5
- {{ content }}
@@ -0,0 +1,3 @@
1
+ ---
2
+ layout: default
3
+ ---