can not create ENC chart

1281
12
04-13-2022 11:55 PM
neddyseagoon
New Contributor

Brand new to ArcGIS, and I'm trying to create an iOS app to display a nautical chart.  I can display a regular chart, I've downloaded a data set, and it's copied to my apps sandboxed documents directory.  However, when I try and load it, the datasets are empty.  I copied the code from the website -- as shown below.  Any help would be greatly appreciated (the dummy string was to simply ensure the correct location is used -- the files are verified present)

thx

        let dummy = "/Users/XXX/Library/Containers/D72BE5E6-A3C3-4718-ADA5-10E2B435BBEB/Data/Documents/ENC_ROOT/CATALOG.031"

        let catalogURL      = URL( fileURLWithPath: dummy /*catalogFile*/ )

        self.encExchangeSet = AGSENCExchangeSet(fileURLs: [catalogURL])

        self.encExchangeSet?.load { [weak self] (error) in

            if let error = error {

                print("Error loading exchange dataset \(error.localizedDescription)")

                return

            }

            self?.encExchangeSet?.datasets.forEach {(dataset) in

 ^^^^self?.encExchangeSet?.datasets is nil

 

0 Kudos
12 Replies
neddyseagoon
New Contributor

judicious use of the debugger helped me find how to get the center of the view (close enough anyway 🙂 ).   Still can't figure out why it takes so long to render though

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Hmmm. We've taken a look and PNW does seem abnormally slow. We'll have to take a look.

Thanks for reporting that. 

0 Kudos
Nicholas-Furness
Esri Regular Contributor

From an initial look, could you turn off the spotSoundings and let us know if that helps? They seem to be slowing things down (we'll have to look into why). Once they're off, does panning/zooming behave any differently?

You should be able to get to that through the shared AGSENCEnvironmentSettings…

AGSENCEnvironmentSettings.shared().displaySettings.viewingGroupSettings.spotSoundings = false
0 Kudos