diff --git a/src/components/MapMaplibreGl.tsx b/src/components/MapMaplibreGl.tsx index 1ef080b8..4b3f0c2d 100644 --- a/src/components/MapMaplibreGl.tsx +++ b/src/components/MapMaplibreGl.tsx @@ -139,6 +139,15 @@ class MapMaplibreGlInternal extends React.Component { + if (url.startsWith("/")) { + url = `${window.location.origin}${url}`; + } + return { url }; + }, // setting to always load glyphs of CJK fonts from server // https://maplibre.org/maplibre-gl-js/docs/examples/local-ideographs/ localIdeographFontFamily: false