mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	fix maplibre latlng import (#4977)
This commit is contained in:
		
							parent
							
								
									2e82476cff
								
							
						
					
					
						commit
						d7d464570f
					
				@ -16,7 +16,8 @@
 | 
				
			|||||||
  } from 'svelte-maplibre';
 | 
					  } from 'svelte-maplibre';
 | 
				
			||||||
  import { colorTheme, mapSettings } from '$lib/stores/preferences.store';
 | 
					  import { colorTheme, mapSettings } from '$lib/stores/preferences.store';
 | 
				
			||||||
  import { MapMarkerResponseDto, api } from '@api';
 | 
					  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 type { Feature, Geometry, GeoJsonProperties, Point } from 'geojson';
 | 
				
			||||||
  import Icon from '$lib/components/elements/icon.svelte';
 | 
					  import Icon from '$lib/components/elements/icon.svelte';
 | 
				
			||||||
  import { mdiCog } from '@mdi/js';
 | 
					  import { mdiCog } from '@mdi/js';
 | 
				
			||||||
@ -76,7 +77,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const asMarker = (feature: Feature<Geometry, GeoJsonProperties>): MapMarkerResponseDto => {
 | 
					  const asMarker = (feature: Feature<Geometry, GeoJsonProperties>): MapMarkerResponseDto => {
 | 
				
			||||||
    const featurePoint = feature as FeaturePoint;
 | 
					    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 {
 | 
					    return {
 | 
				
			||||||
      lat: coords.lat,
 | 
					      lat: coords.lat,
 | 
				
			||||||
      lon: coords.lng,
 | 
					      lon: coords.lng,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user