|
POST
|
Hi. Image tiled layers are designed for efficient display and don't have any backing information built in. A couple of thoughts… Do you have access to the source data as feature data to query against? Another option would be to export an image snapshot of the map view using exportImage(), and convert the lat/lon from an AGSPoint into a screen location using locationToScreen(), then read the pixel value of the image for the CGPoint you get back.
... View more
07-28-2022
11:54 AM
|
1
|
1
|
941
|
|
POST
|
Hi. The identify calls available on AGSMapView are focused on interaction so revolve around tapping on the screen. To search using an arbitrary geometry, you will have to call Query on the feature tables that you're interested in. This assumes that the "symbol markers" you're referring to represent features in a feature layer. Take a look a this conceptual doc: hosted-feature-layers Also take a look at this sample, which references a feature table (in this case, an AGSServiceFeatureTable), sets up an AGSQueryParameters, and then calls queryFeatures using the parameters, which is returned a set of features. You would do the same, except that instead of setting a whereClause on the parameters, you would set the geometry to the geometry from the sketch editor, and spatialRelationship to .within. If the "symbol markers" are graphics in a graphics overlay, then you'll have to iterate over each graphic in the graphics overlay and for its geometry use the AGSGeometryEngine.geometry(graphicGeom, within: sketchGeom) to narrow it down. This code could help. It shows both GraphicsOverlay and Feature Layer approaches. I haven't actually run it, but it compiles 🙂 extension AGSGraphicsOverlay {
func getGraphics(within searchPolygon: AGSPolygon) -> [AGSGraphic] {
let graphicsWithinGeometry = (graphics as? [AGSGraphic])?.filter { graphic in
guard let graphicGeometry = graphic.geometry else { return false }
return AGSGeometryEngine.geometry(graphicGeometry, within: searchPolygon)
}
return graphicsWithinGeometry ?? []
}
}
extension Array where Element == AGSGraphicsOverlay {
func getGraphics(within searchPolygon: AGSPolygon) -> [AGSGraphicsOverlay: [AGSGraphic]] {
var results = [AGSGraphicsOverlay: [AGSGraphic]]()
for overlay in self {
results[overlay] = overlay.getGraphics(within: searchPolygon)
}
return results
}
}
extension AGSMap {
func queryFeatures(within searchPolygon: AGSPolygon, completion: @escaping ([AGSFeatureLayer: Result<AGSFeatureQueryResult, Error>]) -> Void) {
// Create a store for all the results coming back from each feature layer
var results = [AGSFeatureLayer: Result<AGSFeatureQueryResult, Error>]()
// Create a Dispatch Group to coordinate the async Query calls against all the feature layers.
let coordinator = DispatchGroup()
// Query each feature layer in parallel, collecting all the query results in the `results` variable.
for layer in operationalLayers.compactMap({ return $0 as? AGSFeatureLayer }) {
guard let table = layer.featureTable else { continue }
// Find all features in the feature layer that are within the search polygon
let params = AGSQueryParameters()
params.whereClause = "1=1"
params.spatialRelationship = .within
params.geometry = searchPolygon
coordinator.enter()
table.queryFeatures(with: params) { [layer] result, error in
defer { coordinator.leave() }
if let error = error {
results[layer] = Result.failure(error)
} else if let result = result {
results[layer] = Result.success(result)
} else {
assertionFailure("No result OR error - that shouldn't happen")
}
}
}
// Once all the queries have completed, execute this code…
coordinator.notify(queue: .main) {
completion(results)
}
}
} You could then call that with something like this… if let searchGeom = sketchEditor.geometry as? AGSPolygon {
map.queryFeatures(within: searchGeom) { results in
for (layer, queryResponse) in results {
print("Got result for \(layer.name)")
switch queryResponse {
case .success(let queryResult):
print("Found \(queryResult.featureEnumerator().allObjects.count) features")
case .failure(let error):
print("There was an error querying the layer: \(error.localizedDescription)")
}
}
}
if let results = (mapView.graphicsOverlays as? [AGSGraphicsOverlay])?.getGraphics(within: searchGeom) {
for (overlay, graphics) in results {
print("Found \(graphics.count) graphics in overlay \(overlay)")
}
}
} Again, I haven't had a chance to run this code, but it should give you an idea of how to do this.
... View more
07-27-2022
09:55 AM
|
1
|
1
|
1316
|
|
POST
|
Hey @Element808. Thanks for the kind words again! Are you asking about being able to read a web map or web scene? Right now we support accessing layers directly. Reading a web map/web scene is something that we'll get to in time but first we want to add support for a few more layer types. Then there's the question of integrating with Unreal Landscapes. For that, I'll have to defer to someone on the team who's more familiar with working with Unreal Engine. In the meantime, perhaps you can explain what features of Unreal Landscapes you need to use? It could be that the Maps SDK already supports what you need, albeit slightly differently. Nick.
... View more
07-21-2022
11:17 AM
|
1
|
0
|
6153
|
|
POST
|
Hi @ShawnKleese, I have a theory about what's going on. Can you comment out your line of code that sets the global API Key on the ArcGISRuntimeEnvironment please and try that? Here's what I think is happening: Preplanned map areas are stored as hidden portal items that are related to the web map portal item (there's an area item for each preplanned map area, and each area item itself has related package items, all hidden). The API Key might have access to the web map, but we don't yet automatically extend the API Key access to these related portal items. By setting the global API Key on line 2, any Runtime object that doesn't have an explicit credential set will default to using that global API Key and bypass the authentication manager flow. I think that your OfflineTask can see the web map item, but cannot read the related area items to enumerate them. We need to update our API Key scoping logic to include these related area and package items when scoping an API Key for a web map. In the meantime you could do a couple of things: Do not set the API Key globally, but set it on each Runtime object that needs it. Explicitly set your credential (from line 5 in your code) on your OfflineMapTask with setCredential(). You should then be able to enumerate the preplanned areas. You will probably also need to set it on the DownloadPreplannedOfflineMapJob that you create from the OfflineMapTask Let us know if that helps. If not, you should create a test web map that is entirely public and we can investigate further from there.
... View more
07-20-2022
09:53 AM
|
0
|
1
|
1505
|
|
POST
|
Hi @mvida. Thanks for the question. Yes. Support for vector tile layers is top priority for us and we aim to deliver it late 2022 or early 2023.
... View more
07-14-2022
07:45 AM
|
2
|
0
|
839
|
|
POST
|
Hi @Justin_Greco. Just to clarify, August will be our last release before we introduce Swift UI in the 200.0 release of the new ArcGIS Runtime SDK for Swift. Re-reading the blog post, I can see we could be clearer. I've updated the post. In the meantime, just to reiterate Ting's comment above, we do have this sample to show how to use the current ArcGIS Runtime SDK for iOS with Swift UI.
... View more
07-10-2022
09:11 AM
|
0
|
1
|
3067
|
|
POST
|
Hi. When you take a web maps offline, you do not get geocoding support from that web map. You would have to get hold of .loz/.loc locator files for the area in question (you could use ArcGIS Pro to create those if you have the source data, see Introduction to locators and Create a locator in the ArcGIS Pro docs). Mobile Map Packages are another way to get geocoding offline, but again they are not derived from Web Maps, but created in ArcGIS Pro (which packages up the .loz/.loc files inside the .mmpk). For an overview of the offline options that Runtime supports, see the Offline conceptual guide. One thought: you say that the web map contains address search information. Can you provide more details? If you have a feature layer of addresses that's downloaded with your offline map, you can query that to find feature locations. It's not as optimized as building a locator from your data and doesn't support Suggest capabilities, but can work in a pinch if the data is right. Hope this helps. Nick.
... View more
06-16-2022
05:44 AM
|
0
|
0
|
798
|
|
BLOG
|
ArcGIS Runtime SDK version 100.14.1 is now available for all flavors of the ArcGIS Runtime SDKs, and addresses a number of issues. If you are using 100.14.0, we recommend you update to 100.14.1. Please see the release notes for .NET, Android, iOS, Qt, and Java for more details. Get the update via your package manager, or download the update from the main downloads page. Please note that due to a publishing error, the version info on each SDK's homepage has not been updated and the direct download links on each SDK's Get Started pages still point to 100.14.0. However, the main downloads page (login required) has the correct download links.
... View more
06-15-2022
01:29 PM
|
1
|
0
|
2084
|
|
POST
|
It doesn't appear that the crash has anything to do with the Runtime SDK. It seems that your SymbolViewController instance might be being used as a UICollectionViewDataSource but does not implement numberOfItemsInSection. I couldn't say why this stops working in iOS 15, but that's an Apple API, and not related to ArcGIS Runtime. Please note: version 10.2.5 of the Runtime SDKs was retired in December 2019. You really should be using the 100.x family of Runtime SDKs, though at this point you might hold off until the 200.x family is released (see this blog post).
... View more
05-29-2022
10:39 AM
|
0
|
0
|
1461
|
|
POST
|
Hi. Please direct ArcGIS Maps SDK questions to the early adopter forum until version 1.0 is released.
... View more
05-23-2022
07:20 AM
|
0
|
1
|
758
|
|
POST
|
Hi. The deprecated featureLayer property is of type AGSFeatureLayer, whereas the layer property that the deprecation warning tells you to use is of type AGSLayer. We had to make this change when we introduced Dimension and Annotation layers. You need to cast to AGSFeatureLayer. Something like this will work: let pointSymbol: AGSMultilayerPointSymbol = (feature.featureTable?.layer as? AGSFeatureLayer)?.renderer?.symbol(for: feature) as! AGSMultilayerPointSymbol However, the use of a forced unwrap at the end is a bit unnerving to me - it will crash your app if the layer's renderer symbol changes from a AGSMultilayerPointSymbol to some other symbol type (perhaps if the map is authored differently). You might consider something like this: func drawCallout(_ feature: AGSFeature) {
let e: AGSEnvelope = (feature.geometry?.extent)!
let p: AGSPoint = e.center
guard let mapView = self.mapView,
let pointSymbol: AGSMultilayerPointSymbol = (feature.featureTable?.layer as? AGSFeatureLayer)?.renderer?.symbol(for: feature) as? AGSMultilayerPointSymbol else { return }
var screenPoint: CGPoint = mapView.location(toScreen: p)
screenPoint.y -= pointSymbol.size/2
let newp: AGSPoint = mapView.screen(toLocation: screenPoint)
mapView.callout.show(for: feature, tapLocation: newp, animated: true)
} However, just the first change will work if you're confident your original code is safe. Hope that helps.
... View more
05-23-2022
07:05 AM
|
0
|
0
|
670
|
|
POST
|
Matvei shows using an Airbus service with the Runtime SDKs above. We would need a suitable API Key to test the actual service you're using. That's not a key that's available through the Airbus OneAtlas Developer Portal, but if you could share one with me via DM we can try to test the specific service you are trying to access. Two other suggestions: 1. Remove your headerConfiguration and all other customParameters and just try this one: wmtsService.customParameters["APIKEY"] = "<Your OneAtlas Basemap API Key>" 2. Airbus publishes ArcGIS Services for the OneAtlas Basemap service. You could consider using one of those instead of the WMTS service, but of course you'd still need to authenticate.
... View more
05-17-2022
12:12 PM
|
0
|
0
|
1746
|
|
POST
|
Please provide some information so we can try to reproduce the issue and look into this. At a minimum, what is the stack trace for the crash? Can you share an example slpk that causes the crash?
... View more
05-10-2022
08:01 PM
|
0
|
1
|
1423
|
|
POST
|
I assume that the wmtsService.loadStatus is LOADED and that there is no error reported? If you would like to schedule a call, you should contact Esri Technical Support.
... View more
05-09-2022
11:12 AM
|
0
|
1
|
1873
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-17-2025 10:12 AM | |
| 1 | 11-05-2025 10:52 AM | |
| 1 | 11-04-2025 08:55 AM | |
| 1 | 11-04-2025 08:38 AM | |
| 1 | 11-01-2025 03:25 PM |