diff --git a/modules/rmaps/components/folk-map-viewer.ts b/modules/rmaps/components/folk-map-viewer.ts index bb9b6d6..7956446 100644 --- a/modules/rmaps/components/folk-map-viewer.ts +++ b/modules/rmaps/components/folk-map-viewer.ts @@ -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(); + 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)) { diff --git a/modules/rmaps/mod.ts b/modules/rmaps/mod.ts index 200d433..ffcb3c8 100644 --- a/modules/rmaps/mod.ts +++ b/modules/rmaps/mod.ts @@ -276,7 +276,7 @@ routes.get("/", (c) => { body: ``, scripts: ` - `, + `, styles: ``, })); }); @@ -295,7 +295,7 @@ routes.get("/:room", (c) => { body: ``, scripts: ` - `, + `, })); });