-
-
Notifications
You must be signed in to change notification settings - Fork 843
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
Slow rendering of zoomed map with polylines #990
Comments
Seems like that |
At the moment I am not sure that this error causes freezes. Since making boundingBox not final stops the error but not the freezes. I haven't debugged it yet but have a feeling that the code which updates boundingBox if polylineCulling is true does not really archive intended effects. |
Ignoring the late init error for the moment, you mention a "couple" of polylines, but then mention small towns and villages map (I'm assuming we're not talking raster images here?), so I'm wondering how detailed these polylines are. Again, I may be misunderstanding that. |
Do you mean polyline points? If yes, then each polyline has 181 points (one for each latitude int degree). |
So, do you mean there's a lot more than 2 polylines in total (how many if so), but only 2 would be visible at higher zooms and it's too slow still? |
Lets simplify it - single polyline of 181 points: latitude goes from -65˚ to 65˚ and longitude from -180˚ to 180˚. |
Curious. Just out of interest, if you make the polyline have a stroke width of 0 only (just for testing), does it have any effect on the freezes ? |
@ibrierley Thank you very much for mentioning stroke. My problematical polyline is dotted. When I make it regular line, no freezes! So I guess by now I have to switch to isDotted: false, unfortunatelly. I appreciate if you consider a possibility of making dotted polylines work fast (but I guess they should take more time to be drawn). |
No problem, dotted lines and strokewidths over 1 both have some performance
implications (especially when panzooming I think). I suspect there's some
tweaks for dotted lines, but it's probably a fair bit of work if anyone
ever wants to experiment. I've done the odd hack where when panning I draw
a thin solid line, and then change it after panning, but it sometimes feels
a bit clunky and I had to do my own plugin etc.
…On Fri, Aug 6, 2021 at 8:36 AM mchesnokov ***@***.***> wrote:
@ibrierley <https://github.com/ibrierley> Thank you very much for
mentioning stroke. My problematical polyline is dotted. When I make it
regular line, no freezes! So I guess by now I have to switch to isDotted:
false, unfortunatelly. I appreciate if you consider a possibility of making
dotted polylines work fast (but I guess they should take more time to be
drawn).
Thanks again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#990 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5YN5PGWLFOV2BRNAGHXG3T3OGGVANCNFSM5BULL4QQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I put a couple of polylines on the map. If I zoom from min zoom to see small towns and villages map is being re-build with some freezes. Other widgets above the map also experience some freezes. If I don't put any polylines, the map works good and doesn't freeze.
I supposed it is because of redrawing polylines outside the viewport. So I set polylineCulling: true but got LateInitializationError: Field 'boundingBox' has already been initialized
since polyline.boundingBox is final but PolylineLayerOptions constructor tries to set its value.
Making boundingBox not final doesn't seem to make polylineCulling work. Or the reason of map freezes is something else.
The text was updated successfully, but these errors were encountered: