You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Why
CARTO now watermarks keyless raster tiles with "API KEY REQUIRED" (since late Aug 2026). Every client embed using the dark theme is affected, e.g. https://www.3saints.ca/where-to-buy.
The light theme was pulling tiles directly from openstreetmap.org, which the OSM tile usage policy forbids for widgets distributed to third-party sites.
What
Both themes now use OpenFreeMap vector tiles (Positron light, Dark dark) rendered by MapLibre GL 5.24.0 through @maplibre/maplibre-gl-leaflet 0.1.4. No API key, no request limits, free for commercial use.
Leaflet markers, popups and marker clustering are untouched. Theme toggle calls setStyle on the same WebGL context.
Keyless Esri Light/Dark Gray canvas raster tiles are used only if WebGL or the MapLibre scripts are unavailable.
Fixes a race: when the API response arrived before the map dependencies finished loading, addMarkers crashed on this.map being null. loadStores now parks the data and the init path replays it.
Version bumped to 1.3.0 in the header, README CDN links and demo snippet. Tag 1.3.0 after merge so cdn.jsdelivr.net/gh/voyera/weedcrawler_map@1.3.0/cannabis-store-map.min.js resolves; clients then bump the version in their script tag.
Verified locally
Demo API key: 2481 stores fetched, 1451 Ontario markers clustered, light → dark → light toggles, no console errors.
Dark style fully applied after toggle (background rgb(12,12,12), 282 rendered basemap features).