You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/README-map.md
+16-12
Original file line number
Diff line number
Diff line change
@@ -37,20 +37,24 @@ Then, add somewhere on the HTML page the SVG element where the map should appear
37
37
<svgid="map"></svg>
38
38
```
39
39
40
-
Finally, customize the map content and style with a bit of javascript code. The example below shows a map on population density in 2016 from Eurostat database *[demo_r_d3dens](http://appsso.eurostat.ec.europa.eu/nui/show.do?dataset=demo_r_d3dens)*. See [the result](https://bl.ocks.org/jgaffuri/raw/0d6e1b1c6f9e1297829f38b9c37737fe/) and [the code](https://bl.ocks.org/jgaffuri/0d6e1b1c6f9e1297829f38b9c37737fe).
41
-
42
-
```javascript
43
-
EstLib.map()
44
-
.width(1000)
45
-
.datasetCode("demo_r_d3dens")
46
-
.filters({time :2016})
47
-
.unitText("people/km²")
48
-
.legendTitleText("Population density (people/km²)")
49
-
.legendBoxHeight(210)
50
-
.legendBoxWidth(190)
51
-
.build();
40
+
Finally, customize the map content and style with a bit of javascript code:
41
+
42
+
```html
43
+
<script>
44
+
EstLib.map()
45
+
.width(1000)
46
+
.datasetCode("demo_r_d3dens")
47
+
.filters({time :2016})
48
+
.unitText("people/km²")
49
+
.legendTitleText("Population density (people/km²)")
50
+
.legendBoxHeight(210)
51
+
.legendBoxWidth(190)
52
+
.build();
53
+
</script>
52
54
```
53
55
56
+
This code builds a map showing population density in 2016, based on statistical figures retrieved directly from Eurostat database *[demo_r_d3dens](http://appsso.eurostat.ec.europa.eu/nui/show.do?dataset=demo_r_d3dens)*. See [the result](https://bl.ocks.org/jgaffuri/raw/0d6e1b1c6f9e1297829f38b9c37737fe/) and [the code](https://bl.ocks.org/jgaffuri/0d6e1b1c6f9e1297829f38b9c37737fe).
57
+
54
58
For further customisation, find a (more) complete documentation below.
0 commit comments