diff options
| author | Adam Soltys <[email protected]> | 2023-10-05 22:41:32 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-10-05 22:41:32 -0700 |
| commit | f03caed2a9e730d30770c749cae33d26103fd36c (patch) | |
| tree | 7269bd2e864f702a323bed7be94cf7c6d671e8ac /src/components | |
| parent | 5dcd48afc84eee277156fbf291ccc3c0191df0f3 (diff) | |
| download | coinos-ui-f03caed2a9e730d30770c749cae33d26103fd36c.tar.gz coinos-ui-f03caed2a9e730d30770c749cae33d26103fd36c.zip | |
check for lat/lng
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/LocationsMap.svelte | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte index c4facf21..329f832a 100644 --- a/src/components/LocationsMap.svelte +++ b/src/components/LocationsMap.svelte @@ -37,7 +37,7 @@ if (zoom > 13 && isInView) { popup.setHTML(`<span class='block font-bold'>${tags.name}</span>`).addTo(map); } else { - popup.remove(); + popup.remove(); popup.setHTML(html(tags)); } } @@ -72,6 +72,7 @@ if (location['deleted_at']) return; let { lat, lon, tags } = location['osm_json']; + if (!(lat && lon)) return; let element = document.createElement('div'); element.className = 'marker'; @@ -82,9 +83,9 @@ .addTo(map); marker.getElement().addEventListener('click', () => { - let h = html(marker.tags); + let h = html(marker.tags); let popup = marker.getPopup(); - popup.setHTML(h); + popup.setHTML(h); }); marker.tags = tags; |
