Select to view content in your preferred language

How to custom mouse wheel zoom in&out factor

519
2
Jump to solution
04-18-2022 12:26 AM
冠廷陳
New Contributor

Because the mouse wheel delta value always is 120/-120, and the zoom in&out factor of mapview is *2 or /2.  So the mapview scale will be fix in some value.

 

Problem:

How to custom zoom in&out value or function let mapview scale be more flexbility?

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

You can set the zoomfactor here: https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.UI....

mapView.InteractionOptions = new Esri.ArcGISRuntime.UI.MapViewInteractionOptions() { ZoomFactor = 1.5 };

Because the mouse wheel delta value always is 120/-120

Some mice reports much smaller (but more frequent) intervals - in that case zooming switches to a much more discrete amount of zoom.

Also try shift + drag to create a zoom box (ctrl+shift+drag to zoom out). 

View solution in original post

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

You can set the zoomfactor here: https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.UI....

mapView.InteractionOptions = new Esri.ArcGISRuntime.UI.MapViewInteractionOptions() { ZoomFactor = 1.5 };

Because the mouse wheel delta value always is 120/-120

Some mice reports much smaller (but more frequent) intervals - in that case zooming switches to a much more discrete amount of zoom.

Also try shift + drag to create a zoom box (ctrl+shift+drag to zoom out). 

0 Kudos
冠廷陳
New Contributor

thank you so much @dotMorten_esri !!!!  The zoomfactor is what I want to find, and it's really solve my problem! The mouse wheel delta value can ignore ~~

0 Kudos