aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-04-13 22:34:46 -0700
committerAdam Soltys <[email protected]>2023-04-13 22:34:46 -0700
commit9cce167a005d8261e4d5fbbcf0d97506a0ae8d5d (patch)
tree5b39578dd21256f4cc65521eace0e33ad7e7470e
parent1cf10289b840d6fc56986d114fd762da75f4b103 (diff)
downloadcoinos-ui-9cce167a005d8261e4d5fbbcf0d97506a0ae8d5d.tar.gz
coinos-ui-9cce167a005d8261e4d5fbbcf0d97506a0ae8d5d.zip
fix locations
-rw-r--r--src/components/LocationsMap.svelte42
-rw-r--r--src/routes/+page.svelte7
2 files changed, 10 insertions, 39 deletions
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 <br> 1628 W 1st Ave #231, Vancouver <br> <a href="https://www.rolfbodywork.com" target="_blank" rel="noreferrer">www.rolfbodywork.com</a>'
- },
- { lat: 49.26419, lng: -123.15702, info: 'Tacos Jorge <br> 2287 W Broadway, Vancouver' },
- {
- lat: 49.28273,
- lng: -123.120735,
- info: 'Engage Strategies <br> <a href="https://www.linkedin.com/in/shauna-collister-32905214" target="_blank" rel="noreferrer">LinkedIn</a>'
- },
- {
- lat: 49.28134,
- lng: -123.02373,
- info: 'Lumota Collection <br> Clothing Design/Upcycling - Appointment Only <br> <a href="tel:778-726-3776">778-726-3776</a> <br> 369 Boundary Rd, Vancouver, BC V5K 2B1 <br> <a href="https://www.instagram.com/lumotacollection/" target="_blank" rel="noreferrer">IG: Lumotacollection</a> <br> <a href="https://www.facebook.com/LumotaCollection/posts" target="_blank" rel="noreferrer">FB: Lumotacollection</a>'
- },
- {
- lat: 49.22643,
- lng: -122.93085,
- info: 'Goodwin Contracting <br> Project Management/Consulting - Appointment Only <br> <a href="tel:403-812-1085">403-812-1085</a> <br> 8017 17th Ave, Burnaby, BC V3N 1M5'
- },
- {
- lat: 51.04813,
- lng: -114.07999,
- info: 'Goodwin Contracting <br> Project Management/Consulting - Appointment Only <br> <a href="tel:403-812-1085">403-812-1085</a> <br> 8017 17th Ave, Burnaby, BC V3N 1M5'
- },
- {
- lat: 49.2677,
- lng: -123.10124,
- info: 'General Strike Coffee <br> Artisan coffee shop <br> 1965 Main St, Vancouver, BC V5T 2K6 <br> <a href="https://www.instagram.com/generalstrikecoffee/" target="_blank" rel="noreferrer">IG: generalstrikecoffee</a>'
- }
- ];*/
-
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(
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 2db2854a..2748e5c0 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -15,8 +15,11 @@
import { onMount } from 'svelte';
export let data;
- let { user } = data;
- let { locations } = data;
+ let { locations, user } = data;
+ let update = (data) => ({ locations, user } = data);
+ $: update(data);
+
+ console.log(data, locations.length);
let howItWorks;
let faq;