ArcGIS Runtime SDK for Qt

Display a scene layer

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, which is a default property of scene view
        Scene {
            // add a basemap
            BasemapTopographic {}

            ArcGISSceneLayer {
                url: "http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer/layers/0"
            }

            // add a surface, which 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"
                }
            }

            // set an initial viewpoint
            ViewpointCenter {
                Point {
                    x: -4.49779155626782
                    y: 48.38282454039932
                    z: 62.013264927081764
                    spatialReference: SpatialReference { wkid: 4326 }
                }
                targetScale: 62.013264927081764

                Camera {
                    id: camera
                    location: Point {
                        x: -4.49779155626782
                        y: 48.38282454039932
                        z: 62.013264927081764
                        spatialReference: SpatialReference { wkid: 4326 }
                    }
                    heading: 41.64729875588979
                    pitch: 71.2017391571523
                    roll: 2.194677223e-314
                }
            }
        }
    }
}


In this topic
  1. Code