summaryrefslogtreecommitdiff
path: root/client/map
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-03-04 16:18:54 +0100
committerJules Laplace <julescarbon@gmail.com>2019-03-04 16:18:54 +0100
commitdc6a8b4ad5e29f8aea2de73646aeca6e819db0b0 (patch)
tree542bdc5031bd5be486a9b7d657a5c35cce1bffa3 /client/map
parentbc0349c19a63b06859341bfa83ff43efdea763d4 (diff)
rebuild
Diffstat (limited to 'client/map')
-rw-r--r--client/map/index.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/client/map/index.js b/client/map/index.js
index 56a5abed..4b922ec5 100644
--- a/client/map/index.js
+++ b/client/map/index.js
@@ -76,17 +76,19 @@ export default function append(el, payload) {
if (address) {
source = [address.lat, address.lng].map(n => parseFloat(n))
+ } else {
+ console.error("No address found for root paper")
+ console.log(data)
}
- // ....i dont think the sort order does anything??
- citations.sort((a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b))
- .forEach(citation => {
- const citationAddress = citation.addresses[0]
- const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n))
- if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return
- addMarker(map, latlng, citation.title, citationAddress.name)
- addArc(map, source, latlng, arcStyles[citationAddress.type])
- })
+ citations.forEach(citation => {
+ // console.log(citation)
+ const citationAddress = citation.addresses[0]
+ const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n))
+ if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return
+ addMarker(map, latlng, citation.title, citationAddress.name)
+ addArc(map, source, latlng, arcStyles[citationAddress.type])
+ })
console.log(paper)