|
POST
|
I'm still checking to see if this is a requirement, but you could try dispatching the AGSLocationDisplaySource delegate calls to the main thread. If the sessionDataReceived notification is being fired (and so received) on a background thread I could see that could potentially cause problems.
... View more
05-23-2018
04:24 AM
|
0
|
11
|
3955
|
|
POST
|
Hey Shimin Cai, Collector does indeed take a similar approach. For inspiration you could look at this C# NMEA Parser. You would have to translate from C# to Swift but there might be some useful info for you there in building your Location Data Source. Cheers, Nick.
... View more
05-22-2018
05:45 PM
|
0
|
16
|
13284
|
|
POST
|
For anyone else following the thread… After some discussion offline it turns out the layer had a definitionExpression on it which the newly added feature didn't match. So, the new feature was being added to the feature service OK, but was not being displayed in the map. Glad we were able to figure this out, Muruganandham Kuppan!
... View more
05-17-2018
05:56 AM
|
1
|
2
|
3345
|
|
POST
|
Hey Jake, Not sure this is the same as the other app freezing issue we discussed separately yesterday, but I'd like to get a repro case for this. I think I can work with what you've given me access to but I'll let you know if I need more info. Separately, if you wouldn't mind (and to help with the readability of this thread), could you edit your post to include the full stack as another attachment. Maybe just keep the crash back trace? Thanks! Nick.
... View more
05-16-2018
06:11 AM
|
0
|
3
|
3412
|
|
POST
|
Hi Muruganandham Kuppan, I need to find out more about the difference between the two, but this thread might be helpful to you. Cheers, Nick
... View more
05-16-2018
05:42 AM
|
0
|
2
|
1596
|
|
POST
|
Hi Brendan McCann, Which service URL and what version of the Runtime SDK are you using? Cheers, Nick
... View more
05-16-2018
05:31 AM
|
0
|
0
|
1018
|
|
POST
|
Could you try that please? Try with the current release (100.2.1). If you still have problems, let's move to DM and investigate your service and your code to try to build a repro case.
... View more
05-15-2018
09:52 AM
|
0
|
0
|
3345
|
|
POST
|
HI Shimin Cai, If you're still looking to implement your own data source, look at the reference doc here. Here's what you need to do. Implement a class that inherits from AGSLocationDataSource. The key functions you need to implement are doStart() and doStop(). These are the entry points to your class. << Runtime communicating to your custom location data source: doStart() will be called by the Runtime when you call AGSMapView.locationDisplay.startWithCompletion(). doStop() will be called by the Runtime when you call AGSMapView.locationDisplay.stop(). >> Providing feedback to Runtime during startup/shutdown: Starting your external device - When Runtime calls your doStart() function, you need to tell Runtime once the external device has started up. Call self.didStartOrFailWithError:() from within your doStart() function to let the Runtime know your external device has started or that it failed to start. Stopping your external device - When Runtime calls your doStop() function, you need to tell Runtime once the external device has stopped. Call didStop() from within your doStop() function to let the Runtime know your external GPS device has stopped. >> Providing location updates to Runtime: Getting a new location - Whenever your external device's API gives you a new location, construct a new AGSLocation object and pass it to self.didUpdateLocation:(). Getting a new heading - If you get a new heading only (and not a completely new location), call self.didUpdateHeading:() with the new heading to let the Runtime know. Hope this helps. Cheers, Nick.
... View more
05-15-2018
06:10 AM
|
2
|
24
|
13286
|
|
POST
|
Hi, You should check the canAddFeature property if you're adding rather than canUpdateFeature. Once you call addFeature:completion: you should see the new feature in the map view. Which version of the Runtime SDK are you using?
... View more
05-14-2018
09:24 AM
|
0
|
2
|
3345
|
|
POST
|
Hi, You don't need to use an AGSGraphic to create a new feature. The pattern is: Create a new feature on the AGSFeatureTable with geometry and attributes using AGSFeatureTable.createFeature(). Add the feature to the AGSFeatureTable using AGSFeatureTable.add(). See Edit features—ArcGIS Runtime SDK for iOS | ArcGIS for Developers. Since you are working with a server (and not local data), then there is one more call to make to push your add to the server, namely applyEdits. The applyEditsWithCompletion() function is found on AGSServiceFeatureTable (and since you created your feature layer with a URL to a service, the AGSFeatureLayer.featureTable property will be an AGSServiceFeatureTable). See the Edit features (connected) sample, in particular the applyEdits call. This should get you going.
... View more
05-07-2018
09:17 AM
|
2
|
8
|
3345
|
|
POST
|
Hi, Update 3 of the runtime (due in the June timeframe) will expose Subtypes through the API. I'm afraid that in the meantime you'll have to get the metadata from the REST endpoint and parse out the information yourself (as you mention, you'll need to upgrade your server). This code might help point you in the right direction: func parseSubtypeInfo(forServiceFeatureTable featureTable:AGSServiceFeatureTable) {
guard let url = featureTable.url else {
return
}
let operation = AGSJSONRequestOperation(remoteResource: featureTable,
url: url,
queryParameters: nil)
operation.registerListener(AGSOperationQueue.shared()) { (jsonResult, error) in
guard error == nil else {
print("Error loading resources: \(error!.localizedDescription)")
return
}
guard let jsonDict = jsonResult as? [String:Any] else {
print("JSON not a dictionary!")
return
}
guard let subtypeField = jsonDict["subtypeField"] as? String,
let defaultSubtypeCode = jsonDict["defaultSubtypeCode"] as? Int,
let subtypes = jsonDict["subtypes"] as? [[String:Any]] else {
print("Couldn't find Subtype info")
return
}
print("Subtype Field: \(subtypeField)")
// subtypes is now an Array of subtype definition Dictionaries.
}
AGSOperationQueue.shared().addOperation(operation)
}
Hope this helps, Nick.
... View more
04-20-2018
03:07 PM
|
2
|
1
|
3330
|
|
POST
|
Hey Shimin, You're nearly there. You just need to make sure the gdb is loaded. gdb.load(completion: { (error) in
guard error == nil else {
print("Error loading the geodatabase! \(error!.localizedDescription)")
return
}
for table in gdb.geodatabaseFeatureTables {
let layer = AGSFeatureLayer(featureTable: table)
map.operationalLayers.add(layer)
}
}) But note that the tables won't have loaded either at this point, so to read hasGeometry, you might want to do this: gdb.load(completion: { (error) in
guard error == nil else {
print("Error loading the geodatabase! \(error!.localizedDescription)")
return
}
AGSLoadObjects(gdb.geodatabaseFeatureTables, { (allLoaded) in
if !allLoaded {
for table in gdb.geodatabaseFeatureTables where table.loadError != nil {
print("Error loading \(table.tableName): \(table.loadError!.localizedDescription)")
}
}
for table in gdb.geodatabaseFeatureTables where table.hasGeometry {
let layer = AGSFeatureLayer(featureTable: table)
map.operationalLayers.add(layer)
}
})
}) If you know your geodatabase only has featuretables with geometry, you can just add them to the operational layers without first loading them.
... View more
04-13-2018
07:47 AM
|
1
|
1
|
1072
|
|
POST
|
Can you give me some more details please? It seems like you might be asking a different question to the one Shimin was asking. In Runtime 100, AGSGraphicsOverlays are added to the AGSMapView.graphicsOverlays collection and are always displayed over operational layers. Layers (e.g. Feature Layers) are added to the AGSMap.operationalLayers collection. There are likewise now two groups of identify methods on AGSMapView (actually, AGSGeoView since they apply to both MapView and SceneView): identifyGraphicsOverlay(s) identifyLayer(s) See them listed here. If you need to identify Graphics, use the identifyGraphicsOverlay(s) methods. If you need to identify Features, use the identifyLayer(s) methods.
... View more
04-06-2018
11:06 AM
|
0
|
0
|
1948
|
|
POST
|
If you're getting a token already and authenticating the layers via backend, to remove the watermark you still need to license your app for deployment (that is to say, licensing the runtime is distinct from authenticating for data access). To do that, follow the instructions here: License your app—ArcGIS Runtime SDK for iOS | ArcGIS for Developers That link includes a code snippet to use if not working with named users - it uses a license key. If you're deploying your app with Lite License functionality, then you can get the license key at Licensing your ArcGIS Runtime App | ArcGIS for Developers , and click the "Show my ArcGIS Runtime Lite License key" button at the top-right.
... View more
03-23-2018
08:21 AM
|
2
|
0
|
1639
|
|
POST
|
Thanks for the kind words! When you're using the TPK in your runtime app, you can override the maxScale on the tiled layer. Note that the Map also has a maxScale so you need to make sure that allows sufficient zooming. If maxScale is set appropriately, you should be able to zoom beyond the rendered scale level.
... View more
03-14-2018
12:49 PM
|
0
|
1
|
3044
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-14-2026 07:07 AM | |
| 2 | 04-30-2026 10:59 AM | |
| 4 | 04-22-2026 08:07 AM | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |