-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paths rendering issue #85
Comments
This due to how path are drawn. MapCompose uses While the demo performs well, my testing on a real app shows a noticeable performance difference. Also, I've seen paths blinks under some circumstances (but this is probably unrelated to It would be nice to investigate this performance issue and see if there's a way to use |
The only idea I have for now is to implement path simplification. When zooming out, a path with 10k points can be simplified to a few dozen lines. This should have impact on performance. However this isn't easy to implement. EDIT: I've implemented the Ramer–Douglas–Peucker algorithm. The result is amazing. Looks like this fixes the performance issue. |
@Nohus Could you test the branch |
Impressive work! I can confirm it works well. I noticed a small issue: the paths seem to be drawn without anti-aliasing and have jagged edges, especially visible at particular angles. I tried setting The path simplification is really good, but I think it's a little bit too aggressive, I can see my paths jumping around as I zoom in and out. I think it may work better for you (and be more required) because you are using paths made of a lot of points. My points are not very dense already. Updating the epsilon argument from
|
Ok for reducing the epsilon. |
I rechecked on a physical device and the paths render correctly, it seems the anti-aliasing issue was emulator-specific, maybe the emulator I used lacks hardware acceleration. False alarm! |
I'm relieved! |
When using the Paths feature, the paths are drawn with artifacts / empty spaces at each connecting point:
For comparison, the same path drawn with the Google Maps Compose library. Notice how the line is fully solid throughout:
The text was updated successfully, but these errors were encountered: