问题描述
我想将tif文件加载到SceneView中,我尝试了this中的方法,代码如下:
Esri.ArcGISRuntime.Geometry.Envelope pacificSouthwestEnvelope = ...;
// Create an ImageFrame with a local image file and the extent envelope
ImageFrame imageFrame = new ImageFrame(new System.Uri(TifFilePath),pacificSouthwestEnvelope);
//ImageFrame imageFrame = new ImageFrame(image,pacificSouthwestEnvelope);
// Add the ImageFrame to an ImageOverlay and set it to be 50% transparent
ImageOverlay imageOverlay = new ImageOverlay(imageFrame);
imageOverlay.Opacity = 1;
// Add the ImageOverlay to the scene view's ImageOverlay collection
MySceneView.ImageOverlays.Add(imageOverlay);
imageFrame.LoadAsync().Wait();
await MySceneView.SetViewpointAsync(new Viewpoint(imageFrame.Extent));
但是没有成功。
在arcmap中获得包络的范围。
调用LoadAsync()方法以确保已加载图层。
最后,我将SceneView的显示范围设置为imageFrame的范围。
但是我没有在SceneView上看到我的照片。
然后我尝试加载.png和.jpg文件,但是它们也都失败了。
我不知道我的代码有什么问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)