fix(rmaps): bump JS cache version + add demo debug logs
Bump folk-map-viewer.js?v=6 → v=7 to bust Cloudflare cache. Add console logs to trace demo marker creation flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6b6646af1a
commit
34f0387c88
|
|
@ -985,9 +985,13 @@ class FolkMapViewer extends HTMLElement {
|
|||
// Persist to IndexedDB for offline pinging
|
||||
this.persistRoomState(state);
|
||||
|
||||
if (!this.map || !(window as any).maplibregl) return;
|
||||
if (!this.map || !(window as any).maplibregl) {
|
||||
console.warn("[rMaps] onRoomStateChange: map not ready", { map: !!this.map, maplibregl: !!(window as any).maplibregl });
|
||||
return;
|
||||
}
|
||||
|
||||
const currentIds = new Set<string>();
|
||||
if (this.space === "demo") console.log("[rMaps demo] onRoomStateChange:", Object.keys(state.participants).length, "participants,", state.waypoints.length, "waypoints");
|
||||
|
||||
// Update participant markers
|
||||
for (const [id, p] of Object.entries(state.participants)) {
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ routes.get("/", (c) => {
|
|||
body: `<folk-map-viewer space="${space}"></folk-map-viewer>`,
|
||||
scripts: `<link rel="preload" href="https://cdn.jsdelivr.net/npm/maplibre-gl@4.1.2/dist/maplibre-gl.js" as="script">
|
||||
<link rel="preload" href="https://cdn.jsdelivr.net/npm/maplibre-gl@4.1.2/dist/maplibre-gl.css" as="style">
|
||||
<script type="module" src="/modules/rmaps/folk-map-viewer.js?v=6"></script>`,
|
||||
<script type="module" src="/modules/rmaps/folk-map-viewer.js?v=7"></script>`,
|
||||
styles: `<link rel="stylesheet" href="/modules/rmaps/maps.css?v=3">`,
|
||||
}));
|
||||
});
|
||||
|
|
@ -295,7 +295,7 @@ routes.get("/:room", (c) => {
|
|||
body: `<folk-map-viewer space="${space}" room="${room}"></folk-map-viewer>`,
|
||||
scripts: `<link rel="preload" href="https://cdn.jsdelivr.net/npm/maplibre-gl@4.1.2/dist/maplibre-gl.js" as="script">
|
||||
<link rel="preload" href="https://cdn.jsdelivr.net/npm/maplibre-gl@4.1.2/dist/maplibre-gl.css" as="style">
|
||||
<script type="module" src="/modules/rmaps/folk-map-viewer.js?v=6"></script>`,
|
||||
<script type="module" src="/modules/rmaps/folk-map-viewer.js?v=7"></script>`,
|
||||
}));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue