To instruct the MapView to navigate in response to button/slider reaction use one of the SetViewPoint...() asynchronous or synchronous methods: https://developers.arcgis.com/net/wpf/api-reference/html/Methods_T_Esri_ArcGISRuntime_UI_Controls_Ma....
To update the slider/UI in response to user interaction/navigation on the map, listen for the NavigationCompleted or ViewpointChanged events (careful with the latter because it fires frequently): https://developers.arcgis.com/net/wpf/api-reference/html/Events_T_Esri_ArcGISRuntime_UI_Controls_Map....
Also see this sample for some tips in programmatically navigating the view: https://developers.arcgis.com/net/wpf/sample-code/geoview-viewpoint-synchronization/.
Hi,
Can you provide more details about the scenario you'd like to implement with mousewheel over the map view?
Thanks
I'm trying to use ReactiveUI to synchronize a slider control, zoom in and out buttons, and the mouse wheel to control zooming on ArcGIS map.
I'm still in design phase...When I use the mouse wheel to zoom, I need the slider to auto update it's position relative to current zoom. I'm thinking in the mouse wheel event to set the slider somehow. I really don't know at this point how I'm going to coordinate all of these things with ReactiveUI. Any ideas are welcomed.
Here is my github that shows a map with a slider and zoom buttons but they are all still independent of each other. ReactiveUI can easily make this happen but I'm not really understanding ReactiveUI that well.
https://github.com/rodsantest1/ReactiveUI_Journey_Solution/tree/RxuiMapSliderMvp
To instruct the MapView to navigate in response to button/slider reaction use one of the SetViewPoint...() asynchronous or synchronous methods: https://developers.arcgis.com/net/wpf/api-reference/html/Methods_T_Esri_ArcGISRuntime_UI_Controls_Ma....
To update the slider/UI in response to user interaction/navigation on the map, listen for the NavigationCompleted or ViewpointChanged events (careful with the latter because it fires frequently): https://developers.arcgis.com/net/wpf/api-reference/html/Events_T_Esri_ArcGISRuntime_UI_Controls_Map....
Also see this sample for some tips in programmatically navigating the view: https://developers.arcgis.com/net/wpf/sample-code/geoview-viewpoint-synchronization/.
Thanks Michael.
Quick question: what would I set the min and max values for slider to based on map zoom?
The mouse wheel event doesn't fire, because the mapview reacts on it. This is pretty typical for routed events in WPF. You can use the Preview* events instead, or choose to subscribe to events regardless of bubbling behavior. However from your scenario, as Mike is saying, use the info from the mapview instead to sync your slider - I'd recommend using the MapScale property to set your slider. You'll probably want to use a Log value of the scale though, since one "notch" on the slider, should double the scale value.
> what would I set the min and max values for slider to based on map zoom
That is entirely up to you and your map. If your map has min/max scales set, use that, but there's no guarantee there is a min/max.
Thank you for the extra info.