Skip to content

Commit

Permalink
Merge pull request #77 from watmildon/main
Browse files Browse the repository at this point in the history
Add scale control and disable map skew/rotate
  • Loading branch information
amandasaurus authored Dec 25, 2024
2 parents f0445c5 + 4e038ba commit d14c32a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ document.addEventListener("alpine:init", async () => {

map.setPadding({ top: 57 });

var scale = new maplibregl.ScaleControl({
maxWidth: 200,
unit: "metric",
});
map.addControl(scale);

map.dragRotate.disable();
map.touchZoomRotate.disableRotation();

map.on("load", () => {
let select = document.querySelector("#selected_tileset");
select.addEventListener("change", (e) => {
Expand Down

0 comments on commit d14c32a

Please sign in to comment.