QGeoView icon indicating copy to clipboard operation
QGeoView copied to clipboard

Zoom Upgrade

Open muby opened this issue 3 years ago • 7 comments

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.

muby avatar Feb 12 '22 09:02 muby

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)

embeddedmz avatar Feb 12 '22 14:02 embeddedmz

You can zoom by selection rect (mouse right button)

ezgif com-gif-maker

This skips many layers (but not all)

AmonRaNet avatar Feb 12 '22 16:02 AmonRaNet

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 avatar Feb 12 '22 16:02 AmonRaNet

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

AmonRaNet avatar Feb 12 '22 16:02 AmonRaNet

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

AmonRaNet avatar Feb 12 '22 16:02 AmonRaNet

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

muby avatar Feb 12 '22 17:02 muby

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 avatar Feb 14 '22 08:02 AmonRaNet

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.

AmonRaNet avatar Jan 03 '24 19:01 AmonRaNet