ArcGIS Runtime SDK for Qt

Display a scene

Loading

Code

import QtQuick 2.6
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import Esri.ArcGISRuntime 100.3

Rectangle {
    width: 800
    height: 600

    // Create a scene view
    SceneView {
        anchors.fill: parent

        // create a scene...scene is a default property of sceneview
        // and thus will get added to the sceneview
        Scene {
            // add a basemap
            BasemapImagery {}

            // add a surface...surface is a default property of scene
            Surface {
                // add an arcgis tiled elevation source...elevation source is a default property of surface
                ArcGISTiledElevationSource {
                    url: "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
                }
            }
        }

        Component.onCompleted: {
            // set viewpoint to the specified camera
            setViewpointCameraAndWait(camera);
        }
    }

    Camera {
        id: camera
        heading: 10.0
        pitch: 80.0
        roll: 0.0

        Point {
            x: 83.9
            y: 28.4
            z: 10010.0
            spatialReference: SpatialReference { wkid: 4326 }
        }
    }
}


In this topic
  1. Code