public Task SetViewingModeAsync( MapViewingMode viewingMode )
Public Function SetViewingModeAsync( _ ByVal viewingMode As MapViewingMode _ ) As Task
Parameters
- viewingMode
public Task SetViewingModeAsync( MapViewingMode viewingMode )
Public Function SetViewingModeAsync( _ ByVal viewingMode As MapViewingMode _ ) As Task
Exception | Description |
---|---|
System.ArgumentException | Map can only be set for 2D views and SceneLocal and SceneGlobal can only be set for 3D views. |
public void SetViewingModeToSceneLocal() { //Get the active map view. var mapView = MapView.Active; if (mapView == null) return; //Check if the view can be set to SceneLocal and if it can set it. if (mapView.CanSetViewingMode(ArcGIS.Core.CIM.MapViewingMode.SceneLocal)) mapView.SetViewingModeAsync(ArcGIS.Core.CIM.MapViewingMode.SceneLocal); }
public void SetViewingModeToSceneLocal() { //Get the active map view. var mapView = MapView.Active; if (mapView == null) return; //Check if the view can be set to SceneLocal and if it can set it. if (mapView.CanSetViewingMode(ArcGIS.Core.CIM.MapViewingMode.SceneLocal)) mapView.SetViewingModeAsync(ArcGIS.Core.CIM.MapViewingMode.SceneLocal); }
Target Platforms: Windows 11, Windows 10, Windows 8.1