AnsweredAssumed Answered

Add a feature

Question asked by glalla_uwi2017 on Nov 1, 2018
Latest reply on Nov 2, 2018 by NManocha-esristaff


I am trying to add a feature as soon as an app is opened. I tried the code below but it is not working. The location is turning on however, the feature is not showing up. How can I fix this?


       Component.onCompleted: {
            if (!mapView.locationDisplay.started) {
                mapView.locationDisplay.autoPanMode = Enums.LocationDisplayAutoPanModeRecenter
                    // create attributes json for the new feature
                    var featureAttributes = {"xxxx" : "xxxx"};
                    // create a new feature using the mouse's map point
                    var point = mapView.locationDisplay.mapLocation
                    var feature = featureTable.createFeatureWithAttributes(featureAttributes, point);
                    // add the new feature to the feature table
            } else {