diff options
Diffstat (limited to 'reports/map.js')
| -rw-r--r-- | reports/map.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/reports/map.js b/reports/map.js index b1b896e7..e6244686 100644 --- a/reports/map.js +++ b/reports/map.js @@ -19,8 +19,7 @@ let points = read_json('citations') let address = read_json('address') let source = [0,0] if (address) { - source[0] = parseFloat(address[1]) - source[1] = parseFloat(address[2]) + source = address.slice(3,5).map(n => parseFloat(n)) console.log(address, source) } points.forEach(point => { @@ -37,7 +36,9 @@ points.forEach(point => { ] */ - const latlng = point[2].slice(1,3) + const latlng = point.slice(5,7).map(n => parseFloat(n)) + console.log(point) + if (!latlng.length || isNaN(latlng[0]) || isNaN(latlng[1])) return var marker = L.marker(latlng).addTo(map); marker.bindPopup([ "<b>",point[0], "</b>", @@ -52,6 +53,7 @@ points.forEach(point => { // vertices: 100, // } // L.Polyline.Arc(source, latlng, arcStyle).addTo(map); + console.log(latlng) var pathStyle = { color: 'rgb(245, 246, 150)', fillColor: 'rgb(245, 246, 150)', |
