<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: In this example the load Status will not working in QML using ArcGIS in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333695#M5084</link>
    <description>&lt;P&gt;&lt;BR /&gt;import QtQuick 2.12&lt;BR /&gt;import QtQuick.Controls 2.12&lt;BR /&gt;import Esri.ArcGISRuntime 100.15&lt;BR /&gt;import Esri.ArcGISExtras 1.1&lt;BR /&gt;import Qt.labs.platform 1.1&lt;BR /&gt;import QtQml 2.15&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ApplicationWindow {&lt;BR /&gt;id: appWindow&lt;BR /&gt;width: 800&lt;BR /&gt;height: 600&lt;BR /&gt;title: "Enc"&lt;BR /&gt;// property url dataPath&lt;BR /&gt;readonly property url dataPath:&lt;BR /&gt;{&lt;BR /&gt;Qt.platform.os === "Windows" ?&lt;BR /&gt;System.writableLocationUrl(System.StandardPathsDocumentsLocation) + "ArcGIS Runtime SDK Qt 100.15.2\ArcGISRuntimeSDKQt\SetupFiles\Data1" :&lt;BR /&gt;System.writableLocationUrl(System.StandardPathsHomeLocation) + "C:\Users\ADMIN\Documents\ArcGIS Runtime SDK Qt 100.15.2\ArcGISRuntimeSDKQt\SetupFiles\Data1"&lt;BR /&gt;}&lt;BR /&gt;property int loadedEncLayerCount: 0&lt;/P&gt;&lt;P&gt;Component.onCompleted: {&lt;BR /&gt;// set resource path&lt;BR /&gt;EncEnvironmentSettings.resourcePath = dataPath + "C:/Users/ADMIN/Documents/enc/hydrography";&lt;BR /&gt;// EncEnvironmentSettings::setResourcePath(defaultDataPath() + "/ArcGIS/Runtime/Data/ENC/hydrography");&lt;/P&gt;&lt;P&gt;// load the EncExchangeSet&lt;BR /&gt;encExchangeSet.load();&lt;BR /&gt;console.log("hydrography");&lt;BR /&gt;}&lt;BR /&gt;//&lt;BR /&gt;Rectangle {&lt;BR /&gt;id: rootRectangle&lt;BR /&gt;clip: true&lt;BR /&gt;width: 800&lt;BR /&gt;height: 600&lt;/P&gt;&lt;P&gt;MapView {&lt;/P&gt;&lt;P&gt;id: mapView&lt;/P&gt;&lt;P&gt;anchors.fill: parent&lt;/P&gt;&lt;P&gt;Component.onCompleted: {&lt;BR /&gt;// Set the focus on MapView to initially enable keyboard navigation&lt;BR /&gt;forceActiveFocus();&lt;BR /&gt;console.log("component");&lt;BR /&gt;// function setupEncEnvironmentSettings() {&lt;BR /&gt;// EncEnvironmentSettings.displaySettings.marinerSettings.displayCategories.standardDisplay = true;&lt;BR /&gt;// }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Map {&lt;BR /&gt;id: map&lt;BR /&gt;Basemap {&lt;BR /&gt;initStyle: Enums.BasemapStyleArcGISOceans&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EncExchangeSet {&lt;BR /&gt;id: encExchangeSet&lt;BR /&gt;paths: [dataPath + "C:/Users/ADMIN/Documents/enc/ExchangeSetwithoutUpdates/ENC_ROOT/CATALOG.031"]&lt;/P&gt;&lt;P&gt;property var layers: []&lt;/P&gt;&lt;P&gt;// connect to the load status changed signal&lt;BR /&gt;onLoadStatusChanged: {&lt;BR /&gt;if (loadStatus === Enums.LoadStatusFailedToLoad) {&lt;BR /&gt;console.log("fail to load", error.message, error.additionalMessage);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (loadStatus !== Enums.LoadStatusLoaded) {&lt;BR /&gt;console.log("here");&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// loop through the datasets&lt;BR /&gt;for (let i = 0; i &amp;lt; datasets.length; i++) {&lt;/P&gt;&lt;P&gt;// create an EncCell from each dataset&lt;BR /&gt;console.log("inside for loop");&lt;BR /&gt;const encCell = ArcGISRuntimeEnvironment.createObject("EncCell", {&lt;BR /&gt;dataset: datasets[i]&lt;BR /&gt;}, map);&lt;/P&gt;&lt;P&gt;// create an EncLayer from each cell&lt;BR /&gt;const encLayer = ArcGISRuntimeEnvironment.createObject("EncLayer", {&lt;BR /&gt;cell: encCell&lt;BR /&gt;}, map);&lt;BR /&gt;layers.push(encLayer);&lt;BR /&gt;console.log(encLayer);&lt;/P&gt;&lt;P&gt;// connect to loadStatusChanged for each layer&lt;BR /&gt;encLayer.loadStatusChanged.connect(()=&amp;gt; {&lt;/P&gt;&lt;P&gt;console.log(encLayer);&lt;BR /&gt;console.log(loadStatus);&lt;BR /&gt;if(encLayer.loadStatus === Enums.LoadStatusLoaded)&lt;BR /&gt;{&lt;BR /&gt;loadedEncLayerCount++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// loop through the layers and zoom to the combined full extent&lt;BR /&gt;if (loadedEncLayerCount === datasets.length) {&lt;BR /&gt;console.log("2");&lt;BR /&gt;const fullExtents = [];&lt;BR /&gt;map.operationalLayers.forEach(layer =&amp;gt; fullExtents.push(layer.fullExtent));&lt;BR /&gt;const fullExtentOfLayers = GeometryEngine.combineExtentsOfGeometries(fullExtents);&lt;BR /&gt;mapView.setViewpointGeometry(fullExtentOfLayers)&lt;BR /&gt;console.log("if2");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;// add the layer to the map&lt;BR /&gt;map.operationalLayers.append(encLayer);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2023 11:34:56 GMT</pubDate>
    <dc:creator>AyushiKamboj</dc:creator>
    <dc:date>2023-09-29T11:34:56Z</dc:date>
    <item>
      <title>In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333668#M5079</link>
      <description>&lt;PRE&gt; &lt;SPAN&gt;//&lt;/SPAN&gt; &lt;SPAN&gt;connect&lt;/SPAN&gt; &lt;SPAN&gt;to&lt;/SPAN&gt; &lt;SPAN&gt;loadStatusChanged&lt;/SPAN&gt; &lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;each&lt;/SPAN&gt; &lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;                        &lt;SPAN&gt;encLayer&lt;/SPAN&gt;.loadStatusChanged.connect(()=&amp;gt; {&lt;/PRE&gt;&lt;PRE&gt;                            &lt;SPAN&gt;if&lt;/SPAN&gt; (&lt;SPAN&gt;encLayer&lt;/SPAN&gt;.loadStatus === &lt;SPAN&gt;Enums&lt;/SPAN&gt;.LoadStatusLoaded) {&lt;/PRE&gt;&lt;PRE&gt;                                loadedEncLayerCount++;&lt;/PRE&gt;&lt;PRE&gt;                            }&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;                            &lt;SPAN&gt;//&lt;/SPAN&gt; &lt;SPAN&gt;loop&lt;/SPAN&gt; &lt;SPAN&gt;through&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;layers&lt;/SPAN&gt; &lt;SPAN&gt;and&lt;/SPAN&gt; &lt;SPAN&gt;zoom&lt;/SPAN&gt; &lt;SPAN&gt;to&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;combined&lt;/SPAN&gt; &lt;SPAN&gt;full&lt;/SPAN&gt; &lt;SPAN&gt;extent&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;                            &lt;SPAN&gt;if&lt;/SPAN&gt; (loadedEncLayerCount === &lt;SPAN&gt;datasets&lt;/SPAN&gt;.length) {&lt;/PRE&gt;&lt;PRE&gt;                                &lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;fullExtents&lt;/SPAN&gt; = [];&lt;/PRE&gt;&lt;PRE&gt;                                &lt;SPAN&gt;map&lt;/SPAN&gt;.operationalLayers.forEach(layer =&amp;gt; &lt;SPAN&gt;fullExtents&lt;/SPAN&gt;.push(&lt;SPAN&gt;layer&lt;/SPAN&gt;.fullExtent));&lt;/PRE&gt;&lt;PRE&gt;                                &lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;fullExtentOfLayers&lt;/SPAN&gt; = &lt;SPAN&gt;GeometryEngine&lt;/SPAN&gt;.combineExtentsOfGeometries(&lt;SPAN&gt;fullExtents&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;                                &lt;SPAN&gt;mapView&lt;/SPAN&gt;.setViewpointGeometry(&lt;SPAN&gt;fullExtentOfLayers&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;                            }&lt;/PRE&gt;&lt;PRE&gt;                        });&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 08:55:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333668#M5079</guid>
      <dc:creator>AyushiKamboj</dc:creator>
      <dc:date>2023-09-29T08:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333673#M5081</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Where is enLayer.load()?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 09:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333673#M5081</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-09-29T09:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333674#M5082</link>
      <description>&lt;PRE&gt; &lt;SPAN&gt;layers&lt;/SPAN&gt;.push(&lt;SPAN&gt;encLayer&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 09:56:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333674#M5082</guid>
      <dc:creator>AyushiKamboj</dc:creator>
      <dc:date>2023-09-29T09:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333678#M5083</link>
      <description>&lt;P&gt;Pushing to layers list is not layer loading. Look at the MapViewer template. Loading layer sequence must be like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;                function loadVectorTileLayer()
                {
                    mapLayers.push(layerUrl)

                    const tiledcustomLayer = ArcGISRuntimeEnvironment.createObject("ArcGISVectorTiledLayer", {url: layerUrl});
                    operationalLayers.append(tiledcustomLayer)
                    addLayerToContent(tiledcustomLayer)
                }

                function addLayerToContent(layer)
                {
                    if (layer.loadStatus !== Enums.LoadStatusLoaded)
                    {
                        layer.loadStatusChanged.connect(function(){
                            if (layer.loadStatus === Enums.LoadStatusLoaded){
                                // your code here
                            }
                        }
                        )
                        layer.load()
                    }
                    else
                    {
                        mapView.processLoadStatusChange()
                        mapView.setViewpointGeometry(layer.fullExtent)

                    }
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 10:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333678#M5083</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-09-29T10:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333695#M5084</link>
      <description>&lt;P&gt;&lt;BR /&gt;import QtQuick 2.12&lt;BR /&gt;import QtQuick.Controls 2.12&lt;BR /&gt;import Esri.ArcGISRuntime 100.15&lt;BR /&gt;import Esri.ArcGISExtras 1.1&lt;BR /&gt;import Qt.labs.platform 1.1&lt;BR /&gt;import QtQml 2.15&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ApplicationWindow {&lt;BR /&gt;id: appWindow&lt;BR /&gt;width: 800&lt;BR /&gt;height: 600&lt;BR /&gt;title: "Enc"&lt;BR /&gt;// property url dataPath&lt;BR /&gt;readonly property url dataPath:&lt;BR /&gt;{&lt;BR /&gt;Qt.platform.os === "Windows" ?&lt;BR /&gt;System.writableLocationUrl(System.StandardPathsDocumentsLocation) + "ArcGIS Runtime SDK Qt 100.15.2\ArcGISRuntimeSDKQt\SetupFiles\Data1" :&lt;BR /&gt;System.writableLocationUrl(System.StandardPathsHomeLocation) + "C:\Users\ADMIN\Documents\ArcGIS Runtime SDK Qt 100.15.2\ArcGISRuntimeSDKQt\SetupFiles\Data1"&lt;BR /&gt;}&lt;BR /&gt;property int loadedEncLayerCount: 0&lt;/P&gt;&lt;P&gt;Component.onCompleted: {&lt;BR /&gt;// set resource path&lt;BR /&gt;EncEnvironmentSettings.resourcePath = dataPath + "C:/Users/ADMIN/Documents/enc/hydrography";&lt;BR /&gt;// EncEnvironmentSettings::setResourcePath(defaultDataPath() + "/ArcGIS/Runtime/Data/ENC/hydrography");&lt;/P&gt;&lt;P&gt;// load the EncExchangeSet&lt;BR /&gt;encExchangeSet.load();&lt;BR /&gt;console.log("hydrography");&lt;BR /&gt;}&lt;BR /&gt;//&lt;BR /&gt;Rectangle {&lt;BR /&gt;id: rootRectangle&lt;BR /&gt;clip: true&lt;BR /&gt;width: 800&lt;BR /&gt;height: 600&lt;/P&gt;&lt;P&gt;MapView {&lt;/P&gt;&lt;P&gt;id: mapView&lt;/P&gt;&lt;P&gt;anchors.fill: parent&lt;/P&gt;&lt;P&gt;Component.onCompleted: {&lt;BR /&gt;// Set the focus on MapView to initially enable keyboard navigation&lt;BR /&gt;forceActiveFocus();&lt;BR /&gt;console.log("component");&lt;BR /&gt;// function setupEncEnvironmentSettings() {&lt;BR /&gt;// EncEnvironmentSettings.displaySettings.marinerSettings.displayCategories.standardDisplay = true;&lt;BR /&gt;// }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Map {&lt;BR /&gt;id: map&lt;BR /&gt;Basemap {&lt;BR /&gt;initStyle: Enums.BasemapStyleArcGISOceans&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EncExchangeSet {&lt;BR /&gt;id: encExchangeSet&lt;BR /&gt;paths: [dataPath + "C:/Users/ADMIN/Documents/enc/ExchangeSetwithoutUpdates/ENC_ROOT/CATALOG.031"]&lt;/P&gt;&lt;P&gt;property var layers: []&lt;/P&gt;&lt;P&gt;// connect to the load status changed signal&lt;BR /&gt;onLoadStatusChanged: {&lt;BR /&gt;if (loadStatus === Enums.LoadStatusFailedToLoad) {&lt;BR /&gt;console.log("fail to load", error.message, error.additionalMessage);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (loadStatus !== Enums.LoadStatusLoaded) {&lt;BR /&gt;console.log("here");&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// loop through the datasets&lt;BR /&gt;for (let i = 0; i &amp;lt; datasets.length; i++) {&lt;/P&gt;&lt;P&gt;// create an EncCell from each dataset&lt;BR /&gt;console.log("inside for loop");&lt;BR /&gt;const encCell = ArcGISRuntimeEnvironment.createObject("EncCell", {&lt;BR /&gt;dataset: datasets[i]&lt;BR /&gt;}, map);&lt;/P&gt;&lt;P&gt;// create an EncLayer from each cell&lt;BR /&gt;const encLayer = ArcGISRuntimeEnvironment.createObject("EncLayer", {&lt;BR /&gt;cell: encCell&lt;BR /&gt;}, map);&lt;BR /&gt;layers.push(encLayer);&lt;BR /&gt;console.log(encLayer);&lt;/P&gt;&lt;P&gt;// connect to loadStatusChanged for each layer&lt;BR /&gt;encLayer.loadStatusChanged.connect(()=&amp;gt; {&lt;/P&gt;&lt;P&gt;console.log(encLayer);&lt;BR /&gt;console.log(loadStatus);&lt;BR /&gt;if(encLayer.loadStatus === Enums.LoadStatusLoaded)&lt;BR /&gt;{&lt;BR /&gt;loadedEncLayerCount++;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// loop through the layers and zoom to the combined full extent&lt;BR /&gt;if (loadedEncLayerCount === datasets.length) {&lt;BR /&gt;console.log("2");&lt;BR /&gt;const fullExtents = [];&lt;BR /&gt;map.operationalLayers.forEach(layer =&amp;gt; fullExtents.push(layer.fullExtent));&lt;BR /&gt;const fullExtentOfLayers = GeometryEngine.combineExtentsOfGeometries(fullExtents);&lt;BR /&gt;mapView.setViewpointGeometry(fullExtentOfLayers)&lt;BR /&gt;console.log("if2");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;// add the layer to the map&lt;BR /&gt;map.operationalLayers.append(encLayer);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 11:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333695#M5084</guid>
      <dc:creator>AyushiKamboj</dc:creator>
      <dc:date>2023-09-29T11:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333730#M5085</link>
      <description>&lt;PRE&gt;mapLayers.push(layerUrl)&lt;/PRE&gt;&lt;P&gt;where you define mapLayers and layer?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 13:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333730#M5085</guid>
      <dc:creator>AyushiKamboj</dc:creator>
      <dc:date>2023-09-29T13:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: In this example the load Status will not working in QML using ArcGIS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333741#M5086</link>
      <description>&lt;P&gt;I just copied you some functions from AppStudio MapView template to show you layer loading pattern.&lt;/P&gt;&lt;P&gt;1. Creating layer object&lt;/P&gt;&lt;P&gt;2. Connect to&amp;nbsp;loadStatusChanged event listening&lt;/P&gt;&lt;P&gt;3. Load layer&lt;/P&gt;&lt;P&gt;Look at Maps SDK For Qt &lt;A href="https://developers.arcgis.com/qt/qml/sample-code/browse-ogc-api-feature-service/" target="_self"&gt;sample&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 14:00:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/in-this-example-the-load-status-will-not-working/m-p/1333741#M5086</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-09-29T14:00:54Z</dc:date>
    </item>
  </channel>
</rss>

