Given:
Visual Studio 2019 Pro
ArcGIS Tutorial - Display a map
What's the easiest way to put zoom in and zoom out buttons on the map? I know you can use a scroll wheel but I need the zoom buttons to show as well.
Solved! Go to Solution.
I'm assuming you're using XAML, so add two <Button /> controls to your view, and in their click handlers, call one of the SetViewpoint* operations. For example:
mapView.SetViewpointScaleAsync(mapView.MapScale / 2); // Zoom in
mapView.SetViewpointScaleAsync(mapView.MapScale * 2); // Zoom out
I'm assuming you're using XAML, so add two <Button /> controls to your view, and in their click handlers, call one of the SetViewpoint* operations. For example:
mapView.SetViewpointScaleAsync(mapView.MapScale / 2); // Zoom in
mapView.SetViewpointScaleAsync(mapView.MapScale * 2); // Zoom out