ground-android
ground-android copied to clipboard
[Add polygon] When drawing, last edge is only updated when map stops moving
We should update the edge on camera move rather than on drag finished.
@shobhitagarwal1612 Also related to your last PR.. could you PTAL?
SGTM
I created a sample PR with the changes. It shows some performance issues. Possible reasons:
- We create a new instance of
PointandCameraPositionon each position update. PolygonDrawingViewlistens to position updates regardless of visibility.
Is GoogleMapsAdapter#setMapFeatures updating only the changed features as it should, or is it updating all features on each change?
Features are only being updated when the map stops moving. IMO, just the unregulated creation of objects on each camera motion is behind the cause. (Plus a couple of more optimisations)
@shobhitagarwal1612 for current status -- would you like to take this on as well?
Closing in favor of https://github.com/google/ground-android/issues/1839