Skip to content

Commit aaa4c1e

Browse files
committed
update leaflet choropleth
changed from json to geojson and redid some styling
1 parent 0fd6dbb commit aaa4c1e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

maps/lucasCo_hungarian_leaflet.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717

1818
.info {
1919
padding: 6px 8px;
20-
font: 14px/16px Arial, Helvetica, sans-serif;
20+
font: 14px/16px 'Open Sans', Helvetica, sans-serif;
2121
background: white;
22-
background: rgba(255,255,255,0.8);
22+
background: rgba(255,255,255,0.98);
2323
box-shadow: 0 0 15px rgba(0,0,0,0.2);
24-
border-radius: 5px;
24+
border-radius: 0px;
2525
}
2626
.info h4 {
2727
margin: 0 0 5px;
28-
color: #777;
28+
color: #000;
2929
}
3030
.legend {
3131
line-height: 18px;
3232
color: #555;
3333
}
3434
.legend i {
35-
width: 18px;
35+
width: 36px;
3636
height: 18px;
3737
float: left;
3838
margin-right: 8px;
@@ -77,8 +77,8 @@
7777
// loop through our density intervals and generate a label with a colored square for each interval
7878
for (var i = 0; i < grades.length; i++) {
7979
div.innerHTML +=
80-
'<i style="background:' + getColor(grades[i] + 1) + '"></i> ' +
81-
grades[i] + (grades[i + 1] ? '&ndash;' + grades[i + 1] + '<br>' : '+');
80+
'<i style="background:' + getColor(grades[i]) + '"></i> ' +
81+
grades[i] + (grades[i + 1] ? '&ndash;' + (grades[i + 1]-0.1) + '<br>' : '+');
8282
}
8383

8484
return div;
@@ -142,7 +142,7 @@
142142
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
143143
}).addTo(map);
144144
//Add geojson
145-
$.getJSON("../data/prepared/lucasCo_hungarian_tracts.json", function(data) {
145+
$.getJSON("../data/prepared/lucasCo_hungarian_tracts.geojson", function(data) {
146146
geojson = L.geoJson(data, {
147147
style: style,
148148
onEachFeature: onEachFeature

0 commit comments

Comments
 (0)