fix: when proposing a new address, map should display at full width and lower zoom #3538
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issues raised by Tewkesbury & West Berks linked here: https://trello.com/c/TAY09Mpw/2980-diagnose-and-fix-map-center-zoom-issue-when-displaying-team-boundaries
Quick but key changes here:
FullWidthWrapper
similar to our other interactive maps (eg DrawBoundary) for more real-estatezoom
from14
to10
which seems to better accomodate more spacious rural councils while still working for London boroughs like Lambeth toodrawGeojsonDataBuffer
prop - we don't need this for initial render, and when coming "back" after having plotted a new address, the map defaults will still be smartly zoomed into & centered on your existing pointNo changes necessary to how we store boundaries or calculate bounding-boxes - that's all correct, was purely a viewport / display issue here I believe!
The viewport is still "clipped" to the council boundary, and now that we're starting at a lower zoom, don't expect to be able to zoom out much from the starting location, but it should feel more "centered" on the full council now (rather than the center of the boundary like before).
Before & afters:
Tewkesbury
West Berks
Lambeth (did not report issue, but is quite a different scope boundary than above examples, so want to confirm it still displays reasonably too!)