Skip to content

Commit 3ea930c

Browse files
committed
add attribution and fix zooming bug
1 parent 356eb1d commit 3ea930c

File tree

3 files changed

+190
-131
lines changed

3 files changed

+190
-131
lines changed

lib/map.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export const Map = function (linkScale: (t: any) => any, sidebar: ReturnType<typ
4747

4848
function mapActiveArea() {
4949
map.setActiveArea({
50-
position: "relative",
51-
left: sidebar.getWidth() + "px",
50+
position: "absolute",
51+
left: 0,
5252
right: 0,
5353
top: 0,
5454
bottom: 0,
@@ -86,7 +86,7 @@ export const Map = function (linkScale: (t: any) => any, sidebar: ReturnType<typ
8686
name: layer.name,
8787
layer:
8888
layer.type == "vector"
89-
? L.maplibreGL({ style: layer.url })
89+
? L.maplibreGL({ style: layer.url, attributionControl: { customAttribution: layer.config.attribution } })
9090
: L.tileLayer(
9191
layer.url.replace(
9292
"{format}",

0 commit comments

Comments
 (0)