Closed Torgian closed 3 years ago
@iosefa Update:
So a problem I'm running into is, on the forest id or customer page map, when you zoom in, then select a feature, the map automatically zooms back out to fit to the extent. I believe this is the watcher at work here. I may have thought of a simple solution, but will need to test after writing this.
I've also written a function that will zoom into the selected feature when it's selected.
@Torgian code looks good. Thanks! Just a thought: I feel that the zoom duration is a bit too long and distracting. Can you please reduce it to 50? From there we can then think about what is best.
Addressed #62
Changes proposed in this pull request:
The auto-zoom function was initially a watcher ,but this caused problems. Before, when you clicked on a feature after being zoomed in on the map, the map would automatically zoom back out to fit the extent of all the features in the view.
I replaced this with a method that is called once when the map is mounted. The timeout can be adjusted later if needed.
Note Observe that the fixes in #63 are in this MR as well. @hyakumori/maintainer