I want to work in the Desktop Pattern, Accordint to the documentation , we need to set elevation source using some specified formats (i.e dem, geotiff ..) and the layers to be added using .slpk format,
But the API Reference states that the constructor of ArcGISSceneLayer asks for URI, I want to load everything offline , there are no sample codes for offline data. Please help me with some snippets , or examples so I can work with offline 3D Data. Thanks in advance
Hi, I tried on 100.2.1, however, i didn't see my slpk data on the scene control, the region displays gray. i generated the slpk via smart3d, anything i miss? see my code snippet below.
private void LoadSceneTest()
// Create new Scene
Scene myScene = new Scene();
// Set Scene's base map property
myScene.Basemap = Basemap.CreateImagery();
var _elevationSourceUrl = new Uri(@"https://scene.arcgis.com/arcgis/rest/services/BREST_DTM_1M/ImageServer");
// Create and add an elevation source for the Scene
//ArcGISTiledElevationSource elevationSrc = new ArcGISTiledElevationSource(_elevationSourceUrl);
Uri treespk = new System.Uri(@"F:\JointSurvey\数据\倾斜三维\SPK\海沧\spk\spk.slpk");
var treeLayer = new ArcGISSceneLayer();
// add the scene layer to the scene
treeLayer.Source = treespk;
// Create a camera with coordinates showing layer data
Camera camera = new Camera(24.515519999999999, 117.989097000000000, 300, 344, 0, 71.17);
// Assign the Scene to the SceneView
MySceneView.Scene = myScene;
// Set view point of scene view using camera
I also debug the code and found that the treeLayer is loaded correctly and visible. by the way the slpk contrains 3D models from osgb format.
Your file uri should be :
Uri treespk = new System.Uri(@"file://F:/JointSurvey/数据\倾斜三维/SPK/海沧/spk/spk.slpk");
I see you commented out the treeLayer.LoadAsync() call. While you don't need it, explicitly calling it should give you an error message telling you what's wrong. Could you please share that error?
Also while I believe we fixed all Unicode issues with file paths, could you try it with a path that contains basic ASCII characters, just to make sure that's not the issue?
Thanks for reply. I tried explicitly calling LoadAsync() and found that it worked correctly. the file path is not an issue.
I am a bit doubt that there is something wrong with my slpk file as it's the some result(see below snapshot) when i open it via Arcgis Earth. any clues?
by the way, the slpk contrains 3D models which is generated by smart 3d software. Could you provide some sample 'correct' slpk file for testing my code?
Hi Morten Nielsen, I tried my another slpk and succeeded to open it using arcgis runtime 100.2.1.
However, today after I upgrade arcgis runtime .net to v100.3, my scene layer is invisible when it was there when I was using v100.2.1,could you give me some idea on how to fix this? Below is my code snippet to load my local slpk as an