Limit zoom to current search area radius
PhilipGriffith opened this issue · 3 comments
Currently, when the map zooms to a location that has a blue search area encircling it, it zooms in too close: the entire background is a transparent blue. Instead, when zooming to a location with a search area, the application should only zoom to a level at which the entire search area can still be seen. This zoom level will necessarily change given the current radius of the search area.
If a radius changes (we select a new radius in the dropdown), should the view auto-update to the bounds of the changed radius? This would be before a new search is done, just the event of selecting a new radius.
I would say yes. We can simply add a function call within the radius.change event.
This was pretty easily done with the searchArea.getBounds() function.