fix(map): remove coordinate swap, properly format basePath filter with quoting
Revert coordinate transformation (PhotoPrism already returns correct [lng,lat] format). Fix basePath filter query string to properly quote paths with special characters and add wildcard suffix using same quoteIfNeeded logic as filters store. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,17 @@
|
||||
import { setAnchor, setFocused, setOrder } from '$lib/stores/selection.svelte';
|
||||
import Toolbar from '$lib/components/layout/Toolbar.svelte';
|
||||
|
||||
// Helper to quote if needed (matches filters.svelte.ts logic)
|
||||
function quoteIfNeeded(v: string): string {
|
||||
if (!v) return '';
|
||||
if (/^[A-Za-z0-9_\-./]+$/.test(v)) return v;
|
||||
return `"${v.replace(/"/g, '\\"')}"`;
|
||||
}
|
||||
|
||||
const geoQuery = createQuery<PpGeoCollection>(() => {
|
||||
const bp = userBasePath();
|
||||
const q = bp ? `path:${bp}*` : '';
|
||||
// Build path filter: add wildcard first, then quote if needed
|
||||
const q = bp ? `path:${quoteIfNeeded(bp + '*')}` : '';
|
||||
return {
|
||||
queryKey: ['geo', bp],
|
||||
queryFn: () => listGeo(q),
|
||||
|
||||
Reference in New Issue
Block a user