diff --git a/src/main.ts b/src/main.ts index 237d278..27b54da 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,7 +22,7 @@ load().then(mapgl => { }); new ShareControl(map, { - urlMaker: (center, zoom, rotation, pitch) => `${self.origin}?m=${encodeURIComponent(`${center.toString()}/${zoom}/p/${pitch}/r/${rotation}`)}`, + urlMaker: (center, zoom, rotation, pitch) => `${self.origin}${location.pathname}?m=${encodeURIComponent(`${center.toString()}/${zoom}/p/${pitch}/r/${rotation}`)}`, mapCodeMaker: (center, zoom, rotation, pitch) => { const id =`map-${Math.trunc(Math.random() * 10**9)}`; return `