[BUG] Should polygon bounding box cache never be reset ? #1932
Labels
bug
This issue reports broken functionality or another error
needs triage
This new bug report needs reproducing and prioritizing
What is the bug?
When investigating a problem updating flutter_map_line_editor I noted that polygons no longer display ibrierley/flutter_map_line_editor#47
I'm fairly sure the issue is this line...
Where a poly bounding box is cached, which makes perfect sense. In the line_editors case, typically points are added/modified, rather than created anew (which is a possible workaround I've noted in the other issue).
So the bounding box needs to be updated in this case one way or another. Like I said, this can be forced by creating a new poly each time (which I keep fluctuating between it making perfect sense and other times not). However, it also made me think if this is quite correct on flutter_maps side.
If the poly has checks for equality for example (not sure where this is used), or needs a repaint as the points are changed, if it's not equal, then should the bbox cache be updated...or in general should the bbox ever be updated ?
It won't be an issue in flutter_map for most cases as the points rarely change, but wanted to double check for any further thoughts.
How can we reproduce it?
Run flutter_map_line_editor, but code has been highlighted in question.
Do you have a potential solution?
There is a possible workaround to recreate the polygon rather than amend it's points.
Platforms
All
Severity
Minimum: Allows normal functioning
The text was updated successfully, but these errors were encountered: