Skip to content

Commit

Permalink
psp-9632 limit the default bounds when resetting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smith committed Dec 13, 2024
1 parent 2183180 commit 47b5e25
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ const mapRequestStates = {
any
>;
const filteredBounds = geoJSON(featureCollection).getBounds();
const validBounds = filteredBounds.isValid() ? filteredBounds : defaultBounds;
const validBounds =
filteredBounds.isValid() && defaultBounds.contains(filteredBounds) // we should not be automatically setting the bounds outside the default bounds of british columbia.
? filteredBounds
: defaultBounds;

// if the current map bounds contain the bounds of the filtered properties, use the current map bounds.
if (
Expand Down

0 comments on commit 47b5e25

Please sign in to comment.