Skip to content

Commit 2374293

Browse files
committed
Update attribution control
1 parent 8088397 commit 2374293

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

examples/spin-globe/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ const map = new maplibregl.Map({
2727
pitch: -45,
2828
bearing: -15,
2929
maxPitch: 85,
30+
attributionControl: false,
3031
});
3132

3233
map.on("style.load", () => {
3334
map.setProjection({ type: "globe" });
3435
});
3536

37+
map.addControl(new maplibregl.AttributionControl({ compact: true }));
38+
map.on("load", () => {
39+
map
40+
.getContainer()
41+
.querySelector(".maplibregl-ctrl-attrib")
42+
?.classList.remove("maplibregl-compact-show");
43+
});
3644
map.addControl(new maplibregl.GlobeControl());
3745

3846
const spinControl = new SpinGlobeControl({

0 commit comments

Comments
 (0)