Set initial map location

Loading

Code

import QtQuick 2.6
import Esri.ArcGISRuntime 100.2

Rectangle {
    width: 800
    height: 600

    // Create MapView that contains a Map with the Imagery with Labels Basemap
    MapView {
        anchors.fill: parent
        Map {
            BasemapImageryWithLabels {}
            // Set the initialViewpoint property to a ViewpointCenter object
            initialViewpoint: viewpoint
        }
    }

    // Create the intial Viewpoint
    ViewpointCenter {
        id: viewpoint
        // Specify the center Point
        center: Point {
            x: -7122777.61840761
            y: -4011076.1090391986
            spatialReference: SpatialReference { wkid: 102100 }
        }
        // Specify the scale
        targetScale: 15000
    }
}


In this topic
  1. Code