|
POST
|
Is this the same question as The specified discussion was not found. Edit: I see the other question has now been deleted. So I assume it is the same question. Please refrain from posting duplicate questions. If you have more information to add to a question, edit the original question or post a reply directly to it.
... View more
11-05-2019
09:02 AM
|
1
|
2
|
1044
|
|
POST
|
You can look on the featureTable's featureSubtypes property. Note, to read this you'll have to ensure the featureTable is loaded (which it will be if the featureLayer is loaded).
... View more
11-05-2019
09:00 AM
|
0
|
11
|
3061
|
|
POST
|
This sample has the info you need: Create geometries (and the code on GitHub). There are lots of great samples there to help you out. I encourage you to spend some time familiarizing yourself with them. Also, don't overlook the excellent Tutorials. This one in particular answers your question: Display point, line, and polygon graphics
... View more
11-04-2019
07:37 AM
|
0
|
0
|
875
|
|
POST
|
Good to hear it's working. For the problematic layer, layers do have to be "offline enabled" to participate. Assuming it's public, can you share the URL to the layer (DM me if you like)? By default, new layers created in ArcGIS Online are offline enabled, but some older layers might not be. If it's self-hosted, the owner will likely need to explicitly enable offline capabilities. You should see errors when taking the layer offline if it's not offline enabled. When you create the AGSGeodatabaseSyncTask and load it, you can then check the featureServiceInfo property and see if syncEnabled is true. Something like this should work: gdbSyncTask.load { error in
if let error = error {
print("Error loading GDB Sync Task: \(error.localizedDescription)")
return
}
guard let info = gdbSyncTask.featureServiceInfo else {
preconditionFailure("Feature Service Info is not set!")
}
print("Service can be taken offline: \(info.isSyncEnabled)")
}
Let me know if that helps.
... View more
11-01-2019
09:34 AM
|
0
|
1
|
2268
|
|
POST
|
Your graphics all exist in an AGSGraphicsOverlay. You can get the graphics overlay's extent and use mapView.setViewpointGeometry() to set the extent. Something like this: mapView.setViewpointGeometry(graphicsOverlay.extent, completion: nil) or to add a few pixels padding at the edge of your map… mapView.setViewpointGeometry(graphicsOverlay.extent, padding: 30, completion: nil) Note that both of those will animate to the extent of the graphics in the overlay. If there are no graphics in the overlay, nothing will happen (you may see a trapped error in your console log). If you don't want to animate, you must create a viewpoint and set the viewpoint explicitly using the non-animating setViewpoint() method (you can tell it's non-animating because it doesn't have a completion callback block parameter)… mapView.setViewpoint(AGSViewpoint(targetExtent: graphicsOverlay.extent)) The above dynamic extent property is a convenience when working with AGSGraphicsOverlays. You could also use the all-powerful AGSGeometryEngine to get the combined extent of all the graphics' geometries and set the viewpoint to that… if let extent = AGSGeometryEngine.combineExtents(ofGeometries: graphicsOverlay.graphics.compactMap({ ($0 as! AGSGraphic).geometry })) {
mapView.setViewpointGeometry(extent, padding: 30, completion: nil)
} Hope this helps.
... View more
10-31-2019
12:28 PM
|
1
|
0
|
1313
|
|
POST
|
So it looks like valueExpression on a UVR should work, there just isn't an API in Runtime to manipulate it. One thing you could try is to define a UVR with a valueExpression in the JS API and use toJson() on it to get back JSON, translate that JSON to a NSDictionary, then provide that dictionary to the Runtime's AGSUniqueValueRenderer.fromJSON:error:() method. Does that help? Let me know how that goes. Two notes: You could get that JSON out of a saved web map using AGO Assistant if you prefer not to do any JS API code. Another approach would be to use a Dictionary Renderer. See this blog post for some info on that.
... View more
10-25-2019
02:11 PM
|
0
|
0
|
1142
|
|
POST
|
Yes, you would have to modify the symbols. This can be made easier by using renderers (I get the impression you're already doing that), but it would still be something you'd have to code. If you update the renderers on the layers and overlays (or individual symbols on individual graphics) then Runtime will note the change(s) and re-render as needed. The reason why it's this way is a side-effect of having a shared Runtime Core across all platforms. It relegates UIColor to a convenient type for the iOS SDK, but internally Runtime doesn't hold on to a UIColor and so we don't get the benefit of dynamic asset colors in this way.
... View more
10-25-2019
01:11 PM
|
0
|
0
|
1112
|
|
POST
|
We use isNavigating in the open source maps app and it works well. maps-app-ios/MapViewController+AppPreferences.swift at de272de41a2cdcda680a1a296c6467339b63c422 · Esri/maps-app-ios · Gi… You could prevent storing the viewpoint until the first isNavigating = false after setting the initial viewpoint. Out of interest, are you setting the map's viewpoint with an AGSMap constructor, or setting its initialViewpoint before assigning it to the AGSMapView, or are you setting the viewpoint on the AGSMapView? Lastly, in your second set of logs, the isNavigating = false event at 18:29:41:040 looks like it's because the user has not moved the map, even though they might still have their fingers on the map view. Is that possible? But I would expect another log entry after 18:29:43:911 where isNavigating is false again. Did you not see that, or are the logs just a subset?
... View more
10-25-2019
11:39 AM
|
0
|
0
|
3103
|
|
POST
|
You can observe isNavigating and when that is set to false, get the new viewpoint. For example: navigatingObserver = mapView.observe(\.isNavigating, options: [.new]) { (changedMapView, change) in
guard change.newValue == false else { return }
// e.g. read changedMapView.currentViewpoint(with: .centerAndScale)
}
... View more
10-25-2019
10:21 AM
|
1
|
0
|
1922
|
|
POST
|
Hi Michael Davis, You should also be able to right-click the installer and select Open. We will be updating the installer package with a notarized version that Catalina will be happy with, it just isn't there yet. Nick.
... View more
10-10-2019
01:23 PM
|
0
|
0
|
651
|
|
POST
|
If the portal user object has failed to load, you might see null. And if the JSON that Runtime gets back from the service is corrupted somehow, then it's technically possible for the username to be null while the JSON was parsed properly. That's clearly an unexpected and highly unlikely edge-case. I myself would not code expecting that. But in general, I would approach something like this with a guard let statement and/or a precondition. Something like: guard let username = user.username else {
preconditionFailure("Username unexpectedly nil")
}
This will help you during testing to isolate any issues. You could also handle the case more gracefully than with a preconditionFailure() if need be.
... View more
10-05-2019
08:05 PM
|
1
|
1
|
1296
|
|
POST
|
I assume you are calling self.mapView.identifyLayer() from the main thread, and so I'm pretty sure that what's happening is that you're blocking the main thread with your group.wait() call and then the mapView is blocked when it tries to call back into your completion closure. You can learn more about Runtime and threading here: https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-ios/blog/2019/01/19/threading-and-the-ios-runtime-sdk Rather than forcing a synchronous pattern into your function, you should define getFeatureDataAtLocation() with a callback method too. See my answer to a not entirely unrelated question from yesterday. Perhaps one day Swift will finally adopt async but until then you should use this pattern.
... View more
10-03-2019
12:39 PM
|
2
|
0
|
1931
|
|
POST
|
Hi. Yes, these are supported. The System Requirements page will be updated to reflect this shortly.
... View more
10-02-2019
03:59 PM
|
1
|
0
|
1668
|
|
POST
|
It should just work. A couple of things to consider. Are you able to access the services from the browser? Do you have any custom AGSAuthenticationManagerDelegate challenge handlers set up?
... View more
10-02-2019
11:17 AM
|
0
|
3
|
2088
|
|
POST
|
The start callback merely provides info on whether the iOS location API started successfully, or if not, what the reason was. You should also implement the locationChangedHandler to get location updates: mapView.locationDisplay.locationChangedHandler = { newLocation in
// This is an AGSLocation.
print("New location is \(newLocation)")
if let mapPoint = newLocation.position {
// This is an AGSPoint
print("The point represented by the location: \(mapPoint)")
}
// An AGSPoint represents a geographic position in a spatial reference.
// An AGSLocation will include a point for it's position, but also includes
// information about accuracy, heading, velocity, timestamps, etc.
}
... View more
10-02-2019
10:01 AM
|
0
|
0
|
1396
|
| 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 |