2

I tried the Arcgis tutorial from here. It shows how to add basemap and elevation so that the scene would show a 3D surrounding, but it doesn't. Can someone help me?

This is my .cs file

    private void Initialize()
    {
        // Create a new scene
        var myScene = new Scene(Basemap.CreateTopographic());
        Map3D.Scene = myScene;


        // create an elevation source
        var elevationSource = new ArcGISTiledElevationSource(new System.Uri("http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"));
        // create a surface and add the elevation surface
        var sceneSurface = new Surface();
        sceneSurface.ElevationSources.Add(elevationSource);

        // apply the surface to the scene
        Map3D.Scene.BaseSurface = sceneSurface;

        // Create camera with an initial camera position (Mount Everest in the Alps mountains)
        var snowdonCamera = new Camera(53.06, -4.04, 1289, 295, 71, 0);

        // Set the scene view's camera position
        Map3D.SetViewpointCameraAsync(snowdonCamera);
    }

And this is my xaml file

<Grid>
    <esri:SceneView x:Name="Map3D"/>
</Grid>

Actual Result

2
  • Your code looks fine, and it worked for me (using v100.7 on .NET Core 3.1). Could you try and run Fiddler (www.fiddlertool.com) and check that it's actually requesting data from that elevation endpoint and data is successfully coming through?
    – dotMorten
    Feb 27, 2020 at 16:54
  • 1
    @dotMorten thank you so much for this! It was because of I was connected to corporate VPN. I disconnected from it, run the app again and the elevation layer is now loaded. Thank you so much! Feb 27, 2020 at 23:22

1 Answer 1

0

It was due to the corporate VPN I was connected to. For some reason the elevation layer link was blocked by the VPN. I can either set a proxy, or just diconnect from the VPN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.