From d7d464570f2d676bded361ebd48646e408cae568 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Sun, 12 Nov 2023 14:46:17 +0100 Subject: [PATCH] fix maplibre latlng import (#4977) --- web/src/lib/components/shared-components/map/map.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/lib/components/shared-components/map/map.svelte b/web/src/lib/components/shared-components/map/map.svelte index b806c60ce4..3687d117e1 100644 --- a/web/src/lib/components/shared-components/map/map.svelte +++ b/web/src/lib/components/shared-components/map/map.svelte @@ -16,7 +16,8 @@ } from 'svelte-maplibre'; import { colorTheme, mapSettings } from '$lib/stores/preferences.store'; import { MapMarkerResponseDto, api } from '@api'; - import { LngLat, type GeoJSONSource, type LngLatLike, type StyleSpecification } from 'maplibre-gl'; + import maplibregl from 'maplibre-gl'; + import type { GeoJSONSource, LngLatLike, StyleSpecification } from 'maplibre-gl'; import type { Feature, Geometry, GeoJsonProperties, Point } from 'geojson'; import Icon from '$lib/components/elements/icon.svelte'; import { mdiCog } from '@mdi/js'; @@ -76,7 +77,7 @@ const asMarker = (feature: Feature): MapMarkerResponseDto => { const featurePoint = feature as FeaturePoint; - const coords = LngLat.convert(featurePoint.geometry.coordinates as [number, number]); + const coords = maplibregl.LngLat.convert(featurePoint.geometry.coordinates as [number, number]); return { lat: coords.lat, lon: coords.lng,