AnsweredAssumed Answered

Customize "Attribute editing - mobile" sample

Question asked by consodata2 on Sep 4, 2015
Latest reply on Sep 7, 2015 by consodata2

Hi to all,

i'm going to customize sample  Attribute editing - mobile | ArcGIS API for JavaScript.

What i would like to do is edit attributes of existing features of map. This is at the moment forbidden: now is possible only insert a new feture modifying attributes.

I've tried modifyng this method in this way:

 

            on(appGlobals.citizenRequestLayer, "click", function (event){

               //rem this
              //appGlobals
.map.infoWindow.setFeatures([event.graphic]);

 

               //added

                var currentFeature;

                var query = new Query();

                query.objectIds = [event.graphic.attributes.ID];

 

                appGlobals.citizenRequestLayer.queryFeatures(query, function (featureSet) {

                    if (featureSet.features.length > 0) {

                        currentFeature = featureSet.features[0];

                    }

                });

 

                attributeInspector._currentFeature = currentFeature;

 

               $.mobile.changePage("#ui-attributes-page", null, true, true);
           
});

 

when i click on exiting point , i view the message "no features selected".

Can anyone help me ?

 

Thanks

 

GP

Outcomes