AmonRaNet / QGeoView

QGeoView is a Qt / C ++ widget for visualizing geographic data.
GNU Lesser General Public License v3.0
149 stars 56 forks source link

Zoom Upgrade #26

Closed muby closed 8 months ago

muby commented 2 years ago

When you want to quick zoom on an aera, you have to wheel and wheel ... because it's seem that you load all zoom index, even if we don't care of one level.

It could be great if when you want to zoom fast on an area , if you can skip some zoom level to download.

embeddedmz commented 2 years ago

It will not be simple to implement. I think threads are required to implement this feature like in vtkMap. In the latter, there's two layers (maps) one that is single threaded and the other is multithreaded (https://github.com/embeddedmz/vtkMap/tree/bug-fixes/core)

AmonRaNet commented 2 years ago

You can zoom by selection rect (mouse right button)

ezgif com-gif-maker

This skips many layers (but not all)

AmonRaNet commented 2 years ago

QGVLayerTiles uses 250 ms delay during animation. It mean all camera changes are skipped(layer not loading new tiles) in frame of 250 ms. Time is hard-coded (msAnimationUpdateDelay), but you can change it for your code.

AmonRaNet commented 2 years ago

QGVMapQGView has 2 variables: wheelExponentDown and wheelExponentUp which controls "how strong" wheel will change scale (bigger value - bigger change)

AmonRaNet commented 2 years ago

It probably make sense to open such variables in public interface. Doable, but not done yet :)

muby commented 2 years ago

Thanks for you answer I tried to remove or put a low value on the animation, but now i can't explain what it disturb me but it's not "fluid" when you zoom in there is some "lag" or something that i can't explain, but I will try to look on that point.

Thanks

AmonRaNet commented 2 years ago

QGeoView believes in parallelism and efficiency of QNetworkManager. When scale/zoom are changed layer request all visible tiles for new zoom level (again in case of animation there small delay added). When zoom level changed during loading of tiles then pending tiles are requested to cancel download. I always had fear that manager will perform weak under high load (especially in cancellation), but there is no many options... There is some places of optimization and plenty workarounds :) to speed-up view. If you will find some nice tweaks I will be glad to include them to solution

AmonRaNet commented 8 months ago

With this PR https://github.com/AmonRaNet/QGeoView/pull/39 it should be possible to tune now performance very gradual. Please check sample for performance tuning, also there you can find description about all important parameters. I consider this issue as closed.