Skip to content

Commit

Permalink
Fix bug when initially setting map center/zoom
Browse files Browse the repository at this point in the history
For some reason, initially setting the map center and zoom would set the
latitude to 0, only the first time.
  • Loading branch information
jjnesbitt committed Sep 30, 2024
1 parent 61196f8 commit 7d75b37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/storeFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export function clearMap() {
zoom = currentProject.value.default_map_zoom;
}
const map = getMap();
map.setCenter(center);
map.setZoom(zoom);
map.jumpTo({ center, zoom });
}

export function loadDatasets() {
Expand Down

0 comments on commit 7d75b37

Please sign in to comment.