|
12 | 12 |
|
13 | 13 | <!-- plugin: -->
|
14 | 14 | <script src="../leaflet-dataclassification.js"></script>
|
15 |
| - <link rel="stylesheet" href="../leaflet-dataclassification.css" /> |
| 15 | + <link rel="stylesheet" href="../leaflet-dataclassification.css" /> |
| 16 | + |
16 | 17 | <!-- dependencies locally: -->
|
17 |
| - <script src="../lib/simple-statistics.min.js"></script> |
18 |
| - <script src="../lib/chroma.min.js"></script> |
| 18 | + <script src="../lib/simple-statistics.min.js"></script> <!-- https://github.com/simple-statistics/simple-statistics --> |
| 19 | + <script src="../lib/chroma.min.js"></script> <!-- https://github.com/gka/chroma.js --> |
19 | 20 |
|
20 | 21 | <style>
|
21 | 22 | html, body {
|
|
85 | 86 | function tooltip(feature, layer) {
|
86 | 87 | if (feature.properties.name && feature.properties.population) {
|
87 | 88 | layer.bindTooltip('<b>' + feature.properties.name + '</b><br>' + parseInt(feature.properties.population));
|
88 |
| - layer.on('mousemove',e=>{ |
89 |
| - e.target.getTooltip().setLatLng(e.latlng); |
90 |
| - }); |
91 | 89 | }
|
92 | 90 | }
|
93 | 91 | window.testdata2 = L.dataClassification(d, {
|
|
96 | 94 | field: 'population',
|
97 | 95 | pointMode: 'size',
|
98 | 96 | pointSize: {
|
99 |
| - min: 3.7, |
100 |
| - max: 12 |
| 97 | + min: 3.5, |
| 98 | + max: 14 |
101 | 99 | },
|
102 | 100 | classRounding: -4,
|
103 | 101 | legendTitle: 'Population of capitals',
|
|
197 | 195 | }).addTo(map);
|
198 | 196 | });
|
199 | 197 |
|
200 |
| - map.fitBounds([[17, -150],[68, -65]]); |
| 198 | + map.fitBounds([[17, -140],[68, -65]]); |
201 | 199 |
|
202 | 200 | var infopanel = L.control({position: 'bottomright'});
|
203 | 201 | infopanel.onAdd = function (map) {
|
204 | 202 | var div = L.DomUtil.create('div', 'info');
|
205 | 203 | div.innerHTML +=
|
206 |
| - '<div style="display: flex; flex-direction: column; max-width: 500px; text-align: center; row-gap: 8px">' + |
| 204 | + '<div style="display: flex; flex-direction: column; max-width: 515px; text-align: center; row-gap: 8px">' + |
207 | 205 | '<div style="font-weight: bold; margin-bottom: 5px;">' +
|
208 | 206 | 'Leaflet-dataclassification plugin demo page: "combined"' +
|
209 | 207 | '</div>'+
|
|
216 | 214 | '<div>'+
|
217 | 215 | 'Single-step data classification, symbology and legend creation for GeoJSON data powered thematic maps.'+
|
218 | 216 | '<br><br>'+
|
219 |
| - 'Project page: <a href="https://github.com/balladaniel/leaflet-dataclassification">https://github.com/balladaniel/leaflet-dataclassification</a>'+ |
| 217 | + 'Demos: <a href="./points_c.html">points_c</a>, <a href="./points_s.html">points_s</a>, <a href="./lines_c.html">lines_c</a>, <a href="./lines_w.html">lines_w</a>, <a href="./polygons_c.html">polygons_c</a>, <a href="./polygons_c2.html">polygons_c2</a>, <a href="./polygons_h.html">polygons_h</a>'+ |
| 218 | + '<br><br>'+ |
| 219 | + 'Project page: <b><a href="https://github.com/balladaniel/leaflet-dataclassification">https://github.com/balladaniel/leaflet-dataclassification</a></b>'+ |
220 | 220 | '</div>'+
|
221 | 221 | '<a href="https://github.com/balladaniel/leaflet-dataclassification" target="_blank"><img src="banner.png" style="max-width: 100%;"></img></a>'+
|
222 | 222 | '</div>';
|
|
0 commit comments