|
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
|
909
|
|
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
|
3041
|
|
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
|
12650
|
|
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
|
3041
|
|
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
|
3041
|
|
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
|
3090
|
|
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
|
914
|
|
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
|
1725
|
|
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
|
1395
|
|
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
|
2841
|
|
POST
|
Hi Ken. Update 3 is slated for this year, yes. At present I'm afraid there is no such list, but perhaps you can post an idea about a Runtime Roadmap here and set the category as ArcGIS Runtime? Cheers, Nick
... View more
01-31-2018
12:45 PM
|
0
|
0
|
1168
|
|
POST
|
Hi Ken. We don't currently support Vector Tile layers in Scenes. Draping them in a scene is on the roadmap, currently slated for Update 3 although that could change. Nick.
... View more
01-31-2018
07:47 AM
|
0
|
2
|
1168
|
|
POST
|
No problem Trevor. The AGSPortalItem is very generic (it could be a map, or a CSV file, or even an Excel spreadsheet) so it doesn't expose type-specific info (think of it as a Content Management System item where ArcGIS Online or your own portal is the CMS but with geo-capabilities). The "type" property will tell you what it represents. In your case you happen to know it's a FeatureService, which is great. To find out what the sublayers are, it's a bit opaque but can be done. Take the Feature Service URL (that should be accessible via portalItem.serviceURL if the portal item has loaded) and instantiate yourself an instance of AGSGeodatabaseSyncTask. Then call loadWithCompletion() on it. In the completion handler, you'll be able to read the featureServiceInfo property, which gives rich information about the FeatureService itself. Probably more than you wanted to learn about I feel we could expose this a little better, but it's low priority as AGSGeodatabaseSyncTask is very lightweight, does the job, and most use-cases don't need it. Let me know how that goes.
... View more
01-31-2018
07:40 AM
|
1
|
1
|
1088
|
|
POST
|
Sorry. I misread. Entirely my fault. You want to use an AGSArcGISMapImageLayer for a MapService endpoint. Forget the "/0" on the end, instead of the AGSFeatureServiceTable and AGSFeatureLayer, simply instantiate an AGSArcGISMapImageLayer. See this sample. That'll add the layer to the map. Nick. P.S. If you need access to the individual features and attributes, the layer's publisher will need to enable that (if it isn't already) and then there'll be a FeatureService sibling to the MapService which you can access as per my answer from yesterday.
... View more
01-31-2018
07:16 AM
|
0
|
5
|
4069
|
|
POST
|
Your URL is pointing at the service, but you should specify an individual layer URL within that service. So perhaps add "/0" to the end of the URL to make "https://arcgis.../MapServer/0" (if there are multiple layers, use the right layer index). Let me know if that's the issue. You could also call loadWithCompletion() on featureTable and check for any error in the completion block. That could give you some indication of what's going wrong. Nick.
... View more
01-30-2018
05:20 PM
|
1
|
7
|
4069
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 2 | 2 weeks ago | |
| 4 | 3 weeks ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |