|
POST
|
@bferrao - I've got some more information. For both of your issues it's hard to really determine what's going on without some more information. It could be that the service is using a "reserved" fieldname that gets changed during the publishing process; in that case, it's possible the renderer wants to use a field that no longer exists, which could generate the error. If you could provide us with either the service URL or JSON containing the service details (specifically the list of fields) we can dig into it further. Thanks, Mark
... View more
08-04-2021
11:14 AM
|
0
|
1
|
2751
|
|
POST
|
@bferrao - I will get more information that error, but is it possible for you to retest with the latest version of the SDK, which is v100.11? Even if you don't move your production code to 100.11, it would be helpful to see if the issue has been resolved between v100.9 and v100.11. And as with your "load" error question, if you can try an identify with this layer in the AGOL Map Viewer that would help narrow down the cause of the issue. Mark
... View more
08-04-2021
07:15 AM
|
0
|
0
|
2754
|
|
POST
|
@bferrao - Can you try the layer that gives you the load error in the ArcGIS Online Map Viewer? This will help us figure out if it's an issue with the Runtime or the map service. In the meantime, I'll try and get more information on that error. Thanks, Mark
... View more
08-04-2021
07:13 AM
|
0
|
0
|
2754
|
|
POST
|
@bferrao - Thank you for your question, hopefully we can come up with a solution for you. There are a couple of things you should check: does the service in question allow Queries? It's unlikely it doesn't, but you should check. Also, is it possible that the results are more than two levels deep in the identifyLayerResult? You are correct in that you need to drill down into the sublayer results, but you're only going one level deep; is it possible the results are another level down? I've written some code which recursively returns a count of identified geoElements. This will drill down to all levels of the sublayer results. extension ViewController: AGSGeoViewTouchDelegate {
func geoView(_ geoView: AGSGeoView, didTapAtScreenPoint screenPoint: CGPoint, mapPoint: AGSPoint) {
// Identify graphics at the tapped location.
mapView.identifyLayers(atScreenPoint: screenPoint,
tolerance: 10,
returnPopupsOnly: false,
maximumResultsPerLayer: 10
) { [weak self] (results, error) in
//check for errors and ensure identifyLayerResults is not nil
if let error = error {
print(error)
return
}
guard let identifyLayerResults = results,
let self = self else { return }
var resultCount:Int = 0
print("identifyLayerResults.count = \(identifyLayerResults.count)")
// Loop through all results and get the count for those.
for identifyLayerResult in identifyLayerResults {
resultCount += self.getIdentifyLayerResultCount(identifyLayerResult)
}
print("result count = \(resultCount)")
}
}
func getIdentifyLayerResultCount(_ identifyLayerResult: AGSIdentifyLayerResult) -> Int {
var resultCount: Int = 0
resultCount += identifyLayerResult.geoElements.count
//process the sublayer results for each layer (e.g. for map image layers)
print("identifyLayerResult.sublayerResults.count = \(identifyLayerResult.sublayerResults.count)")
// Loop through each subLayerResult recursively and get their count.
for subLayerResult in identifyLayerResult.sublayerResults {
resultCount += getIdentifyLayerResultCount(subLayerResult)
}
return resultCount
}
} Definitely double-check the service and the possibility that results are deeper than the first sublayer. Let me know if this doesn't resolve your issue or if you have more questions. Mark
... View more
07-29-2021
09:01 AM
|
0
|
1
|
2807
|
|
POST
|
@ShiminCai It turns out that the defaultVisibility of the service is ignored when creating the layer from a service URL or AGSServiceFeatureTable. This is by design and behaves the same way the AGOL MapViewer does. The reasoning behind the design is that it would be odd and potentially confusing if you added a map layer and it didn't immediately draw. However, I understand that your use case is different. The SDK does capture the service info correctly in the AGSServiceFeatureTable.layerInfo.isVisibleByDefault property, so a solution would be to set the initial visibility of the freshly created layer to that value. Note that the AGSServiceFeatureTable needs to be loaded before accessing the layerInfo property. Hope that helps. If you have more questions, please let me know. Mark
... View more
07-29-2021
06:59 AM
|
0
|
1
|
2200
|
|
POST
|
@ShiminCai - Thank you for the additional information. I'm going to reach out to some of my colleagues and get back to you.
... View more
07-28-2021
08:28 AM
|
0
|
0
|
2212
|
|
POST
|
I have a couple of questions about your workflow. How are you consuming the layers in the Runtime? Are they part of a web map loaded from ArcGIS Online (AGOL), are you creating the map and adding the layers programmatically or some other way? How are you setting the default layer visibility in the Feature Service? Is it through AGOL? Thank you, Mark
... View more
07-27-2021
12:15 PM
|
0
|
2
|
2229
|
|
POST
|
You can use the "backgroundGrid" property on "MapView". It is an object of type "AGSBackgroundGrid". You can see it in action in the iOS Sample App here. Here's the relevant code: // Create a background grid with default values.
let backgroundGrid = AGSBackgroundGrid(color: .black, gridLineColor: .white, gridLineWidth: 2, gridSize: 32)
// Assign the background grid to the map view.
mapView.backgroundGrid = backgroundGrid Let me know if you need more help!
... View more
07-27-2021
10:58 AM
|
0
|
0
|
1084
|
|
POST
|
@kris The tap and drag behavior is supported using the AGSSketchEditConfiguration class. It has a requireSelectionBeforeDrag property, which defaults to true. Set this to false to get the behavior you want. You'll need to create an AGSSketchEditConfigration, set it's requireSelectionBeforeDrag property to false, then pass the configuration into your AGSSketchEditor.start() call: let config = AGSSketchEditConfiguration()
config.requireSelectionBeforeDrag = false
lineSketchEditor.start(with: AGSSketchCreationMode.polyline,
editConfiguration: config) Let us know if you have any more questions. And good luck with your project! Mark
... View more
07-06-2021
07:29 AM
|
1
|
0
|
952
|
|
POST
|
Hello, sorry to hear you are having a problem. What is your app doing when the crash occurs? If you have sample code or a sequence of steps which reproduces the problem, that would help in determining why the "null pointer" exception happens. I would also recommend what @kris suggests: upgrading to the latest SDK (100.11.2). (RTCViewpoint.m is our code.) Lastly, what version of Xcode/iOS are you using when the crash occurs? Mark
... View more
07-06-2021
06:30 AM
|
0
|
0
|
1398
|
|
POST
|
Eric, Thank you for the clarification. After a quick look, I don't see anything that will immediately solve your problem, but let me dig into it a bit more and get back to you. Cheers, Mark
... View more
06-11-2021
02:30 PM
|
0
|
0
|
1955
|
|
POST
|
Adding a new vertex should only happen on a single-tap event. Panning the map is a tap and drag, which should not trigger the adding of a vertex. You can take a look a the MeasureToolbar in the ArcGIS Runtime Toolkit for iOS for an example implementation of the `AGSSketchEditor` that exhibits the above behavior. If that doesn't help let me know. Mark
... View more
06-11-2021
10:16 AM
|
0
|
0
|
1961
|
|
BLOG
|
This release includes: - Addressed some linting issues that showed up after upgrading to SwiftLint 0.42.0 - Added support for Swift Package Manager. See the documentation on how to incorporate the Toolkit into your app with SPM. - Updated minimum iOS version to 13.0 to match the ArcGIS Runtime SDK for iOS - Support for Carthage has been dropped in favor of Swift Package Manager You can find the Toolkit here. See this blog post for information on the SDK release. We hope you enjoy the new release! Let us know what you're building with it.
... View more
04-22-2021
01:19 PM
|
1
|
0
|
688
|
|
POST
|
@RobertKoch1 Excellent! I'm glad you got it sorted. Please reach out if there's anything else you need. -Mark
... View more
03-10-2021
08:20 AM
|
0
|
0
|
9407
|
|
POST
|
I am able to reproduce your issue with the sample you sent, so thanks for that. Unfortunately, I have not yet been unable to resolve the problem in that sample. Creating a new project and using Cocoapods to consume the Runtime SDK does not cause the issue to appear. If I set the project targets' "Build Active Architecture Only" flag to "false" I received the same error you did. If I then set the "Excluded Architectures" setting to: the problem goes away. I tried doing the same in your sample, but no luck. I also added the following line to the "podfile": "config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" but no luck with that either. I'm convinced that the problem lies with the "arm64" simulator build, as the Runtime SDK does NOT currently include that slice. I will continue to look for a solution, but wanted to keep you updated in case you had any ideas. Mark
... View more
03-05-2021
03:11 PM
|
0
|
3
|
9450
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-30-2025 09:41 AM | |
| 2 | 11-25-2024 01:58 PM | |
| 2 | 08-19-2024 02:33 PM | |
| 1 | 05-31-2023 09:26 AM | |
| 1 | 04-19-2023 08:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-18-2025
09:06 AM
|