Properly bound aggregate map without animation

This commit is contained in:
Eli Ribble 2026-03-05 22:35:34 +00:00
parent fd93d3740b
commit a4a6ab8f3a
No known key found for this signature in database

View file

@ -38,14 +38,11 @@ class MapAggregate extends HTMLElement {
const mapElement = this.shadowRoot.querySelector("#map");
this._map = new maplibregl.Map({
center: centroid.coordinates,
bounds: bounds,
container: mapElement,
style: "https://tiles.stadiamaps.com/styles/alidade_smooth.json",
});
let camera_transform = this._map.cameraForBounds(bounds, {
padding: 10,
});
this._map.setZoom(camera_transform.zoom);
console.log("Initializing map to bounds", bounds);
this._map.on("load", () => {
this._map.addSource("tegola", {
type: "vector",