Topic: Touchpad zoom sensitivity very high
Touchpad is very very sensitive with online maps. Both pitch&zoom and double tap scroll is too sensitive. How can I reduce that?
Thanks for help.
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Touchpad zoom sensitivity very high
Touchpad is very very sensitive with online maps. Both pitch&zoom and double tap scroll is too sensitive. How can I reduce that?
Thanks for help.
Hi.
This is the first report of such a problem, and I would recommend you to first check on another device with a touchpad.
Your description sounds like a problem with the device.
Unfortunately, you cannot adjust the sensitivity for the touchpad separately.
You can only configure the overall zoom sensitivity in the Control component or via the API.
You can't adjust the double-click sensitivity at all, because there's either a double click there or there isn't.
You can only disable zoom on double click.
As a workaround you can try to use some touch framework that Online Maps has integration with.
Perhaps it will not have this problem.
The zoom sensitivity setting in TileSet control seems not to do anything. Whether it is 0.1 or 5 the zoom always changes by 1.
The touchpad problem I have on 3 different laptops, so probably my app settings are somehow wrong? The mouse scrollwheel works fine.
Zoom sensitivity is a divisor of the distance your fingers need to cover when touch zooming to change the zoom to the same value.
It does not affect wheel zoom or zoom on double click.
It should affect zoom on touchpad.
Unfortunately I don't know your application, what settings, components and APIs you are using.
If you want you can email it to me (support@infinity-code.com) and I will check how it works in your application.
I've debugged it deeper, and the UpdateGestureZoomValue method is the only place which uses the zoom sensitivity setting from the tile control. But it is not called at all in my application. Even in the webgl build.
The UpdateZoom() is called, but the zoom delta there is always 1 or -1. In the ZoomOnPoint I get values like 0.2-0.5 while with the mouse plugged and using the mouse scrollwheel the values are 10 times lower: 0.02-0.05.
Both gestures (pinch to zoom and double finger swipe) are too sensitive.
I was thinking maybe I could decrease the zoom delta in general. Delta = 1 is too high for my application. I was trying to set it to 0.5, and it was working OK after some changes, but the methods CoordinatesToTile and TileToCoordinates expect zoom to be an integer, so they are working incorrectly.
Please let me know what can I do with that. Maybe it is important that I'm also using SmoothZoom. I've sent you link to the webgl build.
I added a setting for zoom speed.
The patch is attached.
P.S. I saw your email, but I won't reply to it so I can have all the dialogue in one place.
Just letting you know that the email was not lost.
Thanks for your response. The patch is working, but only if I remove the SmoothZoom. The validation in the SmoothZoomOnMouseEvents does not pass. But the zoomSpeed I think is correct for my application is 0.05. With such low value I think we can like without SmoothZoom.
But this makes zooming with standard mouse scroll very slow. Is it possible to differentiate touchpad gestures from the standard mouse scrollwheel?
And lastly, this patch makes the map zoom to be a float, not an integer. I'm worried if centering map and calculating optimal zoom for positions will work correctly, since the methods there assume that zoom is an integer.
Thanks again for your help.
The main idea of the SmoothZoomOnMouseEvents script is to smoothly round zoom to the next integer.
If you need some other behaviour, modify the script to achieve the desired behaviour.
You can disable zoom by wheel with OnlineMapsControlBase.OnValidateZoom and implement it with required speed in your own script.
https://infinity-code.com/doxygen/onlin … 3591808612
You mean OnlineMapsUtils.GetCenterPointAndZoom, right?
This doesn't use zoom on input, so no problem here.
These methods in OnlineMapsProjection class:
public abstract void CoordinatesToTile(double lng, double lat, int zoom, out double tx, out double ty);
public abstract void TileToCoordinates(double tx, double ty, int zoom, out double lng, out double lat);have input parameter int zoom. What if zoom is a float?
If the zoom is float, you need to do some additional calculations.
What kind of calculations depends on how and why you are using these methods.
But usually you need to multiply or divide the values by the zoomFactor.
https://infinity-code.com/doxygen/onlin … cb932c46ce
Infinity Code Forum → Online Maps Help → Touchpad zoom sensitivity very high
Powered by PunBB, supported by Informer Technologies, Inc.