Skip to content

Commit

Permalink
#970 Switch to bounding box - check workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Nov 27, 2024
1 parent a47a9e9 commit 18a3be2
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions frontend/components/media/MediaMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,25 +206,39 @@ onMounted(() => {
type: "raster",
source: "raster-tiles",
minzoom: 0,
maxzoom: 24,
},
{
id: "cycle-layer",
type: "raster",
source: "cycle-raster-tiles",
minzoom: 0,
maxzoom: 20,
layout: {
visibility: "none",
},
},
],
},
center: [parseFloat(location["lon"]), parseFloat(location["lat"])],
zoom: 15,
pitch: 20,
maxZoom: 20,
});
map.fitBounds(
[
[
parseFloat(location["boundingbox"][2]),
parseFloat(location["boundingbox"][0]),
],
[
parseFloat(location["boundingbox"][3]),
parseFloat(location["boundingbox"][1]),
],
],
{
duration: 0,
padding: 120,
}
);
// MARK: Basic Controls
map.addControl(
Expand Down

0 comments on commit 18a3be2

Please sign in to comment.