private async void MySceneView_SpatialReferenceChanged(object sender, EventArgs e) { MySceneView.SpatialReferenceChanged -= MySceneView_SpatialReferenceChanged; List <string> fileNames = new List <string>(); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n18_w156_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w155_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w156_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w157_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n20_w156_3arc_v2.dt1"); foreach (var item in fileNames) { if (!File.Exists(item)) { MessageBox.Show("Sample data not found"); return; } } _fileElevationSource = new FileElevationSource(fileNames); MySceneView.Scene.Surface.Add(_fileElevationSource); MySceneView.SetViewAsync(new Camera(new MapPoint(-156.277, 18.356, 58877.626), 20.091, 70.160), new TimeSpan(0, 0, 5)); await MySceneView.LayersLoadedAsync(); _isSceneReady = true; MySceneView.MouseMove += MySceneView_MouseMove; }
private async void MySceneView_SpatialReferenceChanged(object sender, EventArgs e) { MySceneView.SpatialReferenceChanged -= MySceneView_SpatialReferenceChanged; List<string> fileNames = new List<string>(); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n18_w156_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w155_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w156_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n19_w157_3arc_v2.dt1"); fileNames.Add(@"..\..\..\samples-data\elevation\SRTM-Void-Filled-3-arc-second\n20_w156_3arc_v2.dt1"); foreach (var item in fileNames) { if (!File.Exists(item)) { MessageBox.Show("Sample data not found"); return; } } _fileElevationSource = new FileElevationSource(fileNames); MySceneView.Scene.Surface.Add(_fileElevationSource); MySceneView.SetViewAsync(new Camera(new MapPoint(-156.277, 18.356, 58877.626), 20.091, 70.160), new TimeSpan(0, 0, 5)); await MySceneView.LayersLoadedAsync(); _isSceneReady = true; MySceneView.MouseMove += MySceneView_MouseMove; }