Add markercluster for POIs and sync base layer via Yjs

- leaflet.markercluster: Dynamic import with fallback to plain layer
  group. Clusters POI markers at low zoom, ungroups at zoom 15+.
- Base layer sync: baselayerchange event writes to Yjs, new
  participants load the selected base layer on connect.
- Both tile overlays and base layer now persist across participants
  and crash recovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-11 02:35:32 +02:00
parent e158205f32
commit ba8a1bbaeb
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
5 changed files with 69 additions and 14 deletions

22
pnpm-lock.yaml generated
View file

@ -361,6 +361,9 @@ importers:
'@tailwindcss/vite':
specifier: 'catalog:'
version: 4.2.2(vite@8.0.8(@types/node@25.5.2)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0))
'@types/leaflet.markercluster':
specifier: ^1.5.6
version: 1.5.6
'@types/react':
specifier: 'catalog:'
version: 19.2.14
@ -370,6 +373,9 @@ importers:
'@types/ws':
specifier: ^8.18.1
version: 8.18.1
leaflet.markercluster:
specifier: ^1.5.3
version: 1.5.3(leaflet@1.9.4)
pino-pretty:
specifier: ^13.1.3
version: 13.1.3
@ -2094,6 +2100,9 @@ packages:
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
'@types/leaflet.markercluster@1.5.6':
resolution: {integrity: sha512-I7hZjO2+isVXGYWzKxBp8PsCzAYCJBc29qBdFpquOCkS7zFDqUsUvkEOyQHedsk/Cy5tocQzf+Ndorm5W9YKTQ==}
'@types/leaflet@1.9.21':
resolution: {integrity: sha512-TbAd9DaPGSnzp6QvtYngntMZgcRk+igFELwR2N99XZn7RXUdKgsXMR+28bUO0rPsWp8MIu/f47luLIQuSLYv/w==}
@ -2992,6 +3001,11 @@ packages:
keyv@4.5.4:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
leaflet.markercluster@1.5.3:
resolution: {integrity: sha512-vPTw/Bndq7eQHjLBVlWpnGeLa3t+3zGiuM7fJwCkiMFq+nmRuG3RI3f7f4N4TDX7T4NpbAXpR2+NTRSEGfCSeA==}
peerDependencies:
leaflet: ^1.3.1
leaflet@1.9.4:
resolution: {integrity: sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==}
@ -5598,6 +5612,10 @@ snapshots:
'@types/json-schema@7.0.15': {}
'@types/leaflet.markercluster@1.5.6':
dependencies:
'@types/leaflet': 1.9.21
'@types/leaflet@1.9.21':
dependencies:
'@types/geojson': 7946.0.16
@ -6542,6 +6560,10 @@ snapshots:
dependencies:
json-buffer: 3.0.1
leaflet.markercluster@1.5.3(leaflet@1.9.4):
dependencies:
leaflet: 1.9.4
leaflet@1.9.4: {}
levn@0.4.1: