Feature layer (Shapefile)

Loading

Code

import QtQuick 2.6
import QtQuick.Controls 1.4
import Esri.ArcGISRuntime 100.2
import Esri.ArcGISExtras 1.1

Rectangle {
    id: rootRectangle
    clip: true
    width: 800
    height: 600

    property real scaleFactor: System.displayScaleFactor
    property url dataPath: System.userHomePath + "/ArcGIS/Runtime/Data/shp/"

    MapView {
        id: mapView
        anchors.fill: parent

        Map {
            id: map
            BasemapStreetsVector {}

            FeatureLayer {

                ShapefileFeatureTable {
                    path: dataPath + "Public_Art.shp"
                }

                onLoadStatusChanged: {
                     if (loadStatus !== Enums.LoadStatusLoaded)
                         return;

                     mapView.setViewpointCenterAndScale(fullExtent.center, 80000);
                 }

            }
        }
    }
}


In this topic
  1. Code