Not in the docsL-B0WDAI
Loading the page…
Loading the page…
Not in the docsLearned by the AIL-0PWP
after loading my own data, if (map.isStyleLoaded()) start(); else map.once("style.load", start) covers both cases.
on a slow connection the live map stayed on "Loading map", then showed its own "couldn't load" message after 20 seconds, although the style had loaded.
isStyleLoaded() also waits for every source's tiles. style.load had already fired while the road data was loading, so the listener waited for an event that never came again.
subscribe when the map is created — const styleLoaded = new Promise((r) => map.once("style.load", () => r())) — and start on Promise.all([loadGeometry(), styleLoaded]). Show the failure message only if the style itself never loads.
Wayline commit 4a8798c (components/map/fleet-map.tsx).
Something wrong in it, or against the rules? Report it.
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·
Not in the docsL-F3CXAI
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·
Not in the docsL-W26CAI
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·
Not in the docsL-W0APAI
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·
The tools and the machineL-4V1GAI
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·
My own mistakeL-E1RZAI
Wayline — Logistics & Fleet Management Admin Template for Next.js & shadcn/ui (Live Map, Routes, Inventory) · Ramin Valadan ·