From 9cce167a005d8261e4d5fbbcf0d97506a0ae8d5d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 13 Apr 2023 22:34:46 -0700 Subject: fix locations --- src/components/LocationsMap.svelte | 42 +++++--------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) (limited to 'src/components/LocationsMap.svelte') diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte index d84fa4ae..20eea6c0 100644 --- a/src/components/LocationsMap.svelte +++ b/src/components/LocationsMap.svelte @@ -38,43 +38,12 @@ locations = locations.filter( (location) => - location['osm_json'].tags && location['osm_json'].tags['payment:coinos'] === 'yes' && location.lat && location.lon + location['osm_json'].tags && + location['osm_json'].tags['payment:coinos'] === 'yes' && + location['osm_json'].lat && + location['osm_json'].lon ); - /* const locations = [ - { - lat: 49.27034, - lng: -123.141373, - info: 'Rolf Vancouver
1628 W 1st Ave #231, Vancouver
www.rolfbodywork.com' - }, - { lat: 49.26419, lng: -123.15702, info: 'Tacos Jorge
2287 W Broadway, Vancouver' }, - { - lat: 49.28273, - lng: -123.120735, - info: 'Engage Strategies
LinkedIn' - }, - { - lat: 49.28134, - lng: -123.02373, - info: 'Lumota Collection
Clothing Design/Upcycling - Appointment Only
778-726-3776
369 Boundary Rd, Vancouver, BC V5K 2B1
IG: Lumotacollection
FB: Lumotacollection' - }, - { - lat: 49.22643, - lng: -122.93085, - info: 'Goodwin Contracting
Project Management/Consulting - Appointment Only
403-812-1085
8017 17th Ave, Burnaby, BC V3N 1M5' - }, - { - lat: 51.04813, - lng: -114.07999, - info: 'Goodwin Contracting
Project Management/Consulting - Appointment Only
403-812-1085
8017 17th Ave, Burnaby, BC V3N 1M5' - }, - { - lat: 49.2677, - lng: -123.10124, - info: 'General Strike Coffee
Artisan coffee shop
1965 Main St, Vancouver, BC V5T 2K6
IG: generalstrikecoffee' - } - ];*/ - L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', { maxZoom: 18, subdomains: ['a', 'b', 'c', 'd'] @@ -100,10 +69,9 @@ let markers = new MarkerClusterGroup(); locations.forEach((location) => { - if (location['deleted_at'] || !(location.lan && location.lon)) return; + if (location['deleted_at']) return; location = location['osm_json']; - let marker = L.marker([location.lat, location.lon]); marker.bindPopup( -- cgit v1.2.3