Skip to content

Commit

Permalink
fix link
Browse files Browse the repository at this point in the history
  • Loading branch information
itanka9 committed Sep 17, 2024
1 parent c771527 commit 83bcab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<div id="${id}" style="width:540px;height:340px;"></div>
Expand Down

0 comments on commit 83bcab8

Please sign in to comment.