AnsweredAssumed Answered

How I can reload or change path property of ShapefileFeatureTable on Appstudio for Arcgis ?

Question asked by haoudardev on Jun 6, 2020
Latest reply on Jun 11, 2020 by LDanzinger-esristaff

Hello,

I'm trying to change the path property of a ShapefileFeatureTable by a fileUrl taked from a FileDialog.

I'm trying with this code:

Mapview{

         id:mapView

         Map{

         FeatureLayer{

                     ShapefileFeatureTable{

                                       id:shpfile

                              }

                     }

               }

            }

FileDialog {
        id: fileDialog
        title: "Ouvrir un fichier shapefile"
        folder: shortcuts.home
        nameFilters: [ "Shapefile (*.shp)"]
        onAccepted: {      
               fileDialog.close
               shpfile.path=fileUrl
               shpfile.retryLoad()
               }
       onRejected: {
       fileDialog.close()

                           }

}

 

The Probem is: on the first add it's work, but on the second add it look like that the path does not change it remain the first Shapfile path.

Thank you for your Help

Outcomes