AnsweredAssumed Answered

Cant identify on Feature Layer

Question asked by jay.kapalczynski on Jun 10, 2019
Latest reply on Jun 25, 2019 by NManocha-esristaff

I am using the Web Map template in AppStudio.  The third sample in this template is "We Map Identify"

 

I update the MAP section as seen below but the feature layer does not identify....Am I missing something????

 

In this .qml file is this code that seems to allow for the identify of a Feature Layer.

 

        // Signal handler for identify
        onIdentifyLayersStatusChanged: {
            if (identifyLayersStatus === Enums.TaskStatusCompleted) {

//SNIP OUT ALL THE CODE ABOVE TO MAKE SHORTER

                    }else{
                        // Results are from Feature Layer
                        // iterate through individual features of the feature Layer results
                        for(var f = 0; f < identifyLayerResult.popups.length; f++){
                            popup = identifyLayerResult.popups[f];
                            selectedFeature = popup.geoElement;
                            popupDef = popup.popupDefinition;
                            // Appending the result to the model                           
                            newPopup = ArcGISRuntimeEnvironment.createObject("Popup", {
                                                                                 initGeoElement: selectedFeature,
                                                                                 initPopupDefinition: popupDef
                                                                             });

                            // create a popup manager
                            newPopupManager = ArcGISRuntimeEnvironment.createObject("PopupManager", {popup: newPopup});
                            popupListModel.append({'popupManager': newPopupManager});
                        }
                    }

                }

 

I updated the MAP section to this

 

 

        Map{
            initUrl: "http://arcgis.com/sharing/rest/content/items/8ccfcc3a83d241ce9765ff4aea459617"
            //initUrl: "https://vafwisdev.dgif.virginia.gov/arcgis/rest/services/DGIF_Test/BoatRampFacilities/FeatureServer/0"

            FeatureLayer {
                ServiceFeatureTable {
                   url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0"
                   //featureRequestMode: Enums.FeatureRequestModeOnInteractionNoCache
                }
            }
            onLoadErrorChanged:{
                console.log(mapView.map.loadError.additionalMessage)
            }
        }

Outcomes