ArcGIS Runtime SDK for Qt

Set initial map area

Loading

Code

import QtQuick 2.6
import Esri.ArcGISRuntime 100.4

Rectangle {
    width: 800
    height: 600

    // Create MapView that contains a Map with the Imagery Basemap
    MapView {
        id: mapView
        anchors.fill: parent
        Map {
            BasemapImagery {}
            initialViewpoint: viewpoint
        }
    }

    // Create the intial Viewpoint
    ViewpointExtent {
        id: viewpoint
        extent: Envelope {
            xMin: -12211308.778729
            yMin: 4645116.003309
            xMax: -12208257.879667
            yMax: 4650542.535773
            spatialReference: SpatialReference { wkid: 102100 }
        }
    }
}


In this topic
  1. Code