AnsweredAssumed Answered

Crashe sometimes when add operetionalLayer to AGSMap

Question asked by tstorck on Mar 6, 2017
Latest reply on Mar 6, 2017 by rolson-esristaff

Hi,

 

Sometimes when i add a AGSFeaturelayer to my AGSMap, the application crashes. But the weird thing is it not occurs always, only sometimes.

 

Below my code:

let geodatabase = AGSGeodatabase(fileURL: geodatabaseURL!)
       
geodatabase.load(completion: {(error:Error?) in
     if error == nil {
          let reversedFeaturetables = geodatabase.geodatabaseFeatureTables.reversed()
          
          for featureTable in reversedFeaturetables {
               self.mapView.map?.operationalLayers.add(AGSFeatureLayer(featureTable: featureTable))
          }

     } else {
          print(error!)
     }
})

Outcomes