POST
|
Hello, At present there isn't anything built in to the SDK for clustering. The 100.x ArcGIS Runtime SDK for iOS will not receive any further new features, just bug fixes, but clustering is on the roadmap for the Swift SDK and we aim to have something released by the end of the year. In the meantime, you could look at this plugin, in particular this branch that works with the 100.x ArcGIS Runtime SDK for iOS. Please note, this is not a supported product, but if you need clustering now, it could provide a way forward.
... View more
06-20-2023
12:28 PM
|
0
|
0
|
525
|
POST
|
Hi, There are a few things that could be going on: Are the spatial references of the TPKs the same? The Runtime SDKs do not reproject tiled layers, so they need to match the spatial reference of the map (which is derived from the spatial reference of the Basemap if there is one), otherwise they will not display. One other thing to look at: the initialViewpoint is a state property on the Map. It's used by the MapView to know how to initially display the map. After that, as you display the map and use it, you set the viewpoint by calling one of the setViewpoint methods on MapView. So, if TPK 2 has the same spatial reference as TPK 1, and you use the MapView.setViewpointGeometryAsync() method to the envelope of the second layer, the Map View should zoom to the 2nd TPK. You will of course need to set the layer for TPK 2 to visible.
... View more
06-09-2023
11:24 AM
|
0
|
0
|
454
|
POST
|
Hi. How are you creating the FeatureCollectionTable? When you create it, you need to specify the fields you expect it to store on all features. If you didn't specify a "title" field, then it won't be part of the created feature. A FeatureCollectionTable has a defined schema that determines the geometry type and attributes (fields) that can be stored for any Feature. Fields can be optional (nullable), of course. See the FeatureCollectionTable constructor, and Field class.
... View more
05-31-2023
11:55 AM
|
0
|
0
|
958
|
POST
|
Hi @GBreen, I'm afraid that you cannot identify on an ArcGISVectorTiledLayer at this time, whether using a Vector Tiled Service, or a VTPK. You won't get any results back for the layer in the identify results. This is something that we are looking at, but currently do not support. Part of the reason is that our basemaps are primarily for visual reference so have very little attribution baked in. Adding attribution would add bloat to the PBF data that is returned. However, if you are working with your own vector tiled layers then one pattern is to have a separate "companion" feature layer that reflects the real-world objects in your vector tiled layer, and identify or query against that feature layer. Sorry it's not the answer you want, but I hope that helps. Nick.
... View more
04-26-2023
03:11 PM
|
0
|
0
|
900
|
BLOG
|
The 200.1 release of the ArcGIS Maps SDKs for Native Apps has just gone live. Notably, this includes the first production ready releases of the ArcGIS Maps SDK for Swift and the ArcGIS Maps SDK for Kotlin. 200.1 also introduces Dynamic Entities, an important new capability that the team has been hard at work on for some time. Check out the ArcGIS Blog post for more details.
... View more
04-19-2023
10:46 AM
|
1
|
0
|
390
|
POST
|
Hi there. The answer for the Kotlin SDK is the same as that for your question about the Swift SDK here. 200.1 of the Kotlin SDK will be production ready, and we're anticipating a release next week. Hope this helps!
... View more
04-14-2023
09:27 AM
|
1
|
0
|
397
|
POST
|
I'll just add a note to Nimesh's reply to address your second question about major changes. There are a number of improvements we've made since the 200.0 beta to make the SDK feel even more natural to a Swift developer. Those changes will be described in the 200.1 release notes. The 100.15 release will receive bug fixes and 3rd party vulnerability fixes, but no new functionality. So if you're starting afresh, the recommendation is definitely to go with the Swift SDK.
... View more
04-14-2023
09:15 AM
|
1
|
0
|
985
|
POST
|
Aha. Ok. I expect that at 100.15 you will not need any additional config on AGSRequestConfiguration because at 100.13 we changed how we register a replica behind the scenes. The service supports two methods of registration. A direct HTTP request to register which doesn't respond until the registration has completed (this is what 100.12 and earlier did), and a job-based approach where the initial request just starts a job and returns immediately, and then we poll the job until it completes or errors (this is what 100.13 and later do). We do all that job monitoring behind the scenes using the same API (i.e. your code wouldn't change). So while the Runtime API call to register might not return for a long time, as of 100.13 it's not making just one long HTTP call, but lots of very lightweight and quick-to-respond status request calls. See the async property in the REST API doc. We made this change for precisely the reason you describe (registering can require back-end database locks which can lead to unpredictable registration times, so the job approach is the only reliable one).
... View more
04-07-2023
03:34 PM
|
0
|
0
|
1185
|
POST
|
Hi Rostislav, It sounds like you are parsing the GeoJSON into polygons that you are adding to a Graphics Overlay. Unfortunately, Graphics Overlays will always display on top of operational layers by design. However, you can achieve the behavior you're looking for by using a FeatureCollectionTable and FeatureCollectionLayer. You can use the AGSGraphics that you are currently creating as input to featureCollectionTableWithGeoElements:fields:, since AGSGraphics are AGSGeoElements. However, there is one additional step you will need to take and that is to provide a set of AGSFields to define the shape of the FeatureCollectionTable. While a Graphics Overlay has no schema and the Graphics can each have any collection of Attributes, a FeatureCollectionTable must have a schema defined. So if your polygon graphics have attributes, create a set of Fields that match those attributes and pass that in to create the featureCollectionTable. This also means that all the graphics must have the same shape type (Polygon in your case) and the same attributes. You can then create a Feature Collection Layer. Here is some sample code that should help. It creates a single large polygon AGSGraphic at 0,0 with two attributes ("ID" and "Created"), and then generates a FeatureCollectionTable. In your code you would of course add many AGSGraphics with polygons generated from the GeoJSON: class ViewController: UIViewController {
@IBOutlet weak var mapView: AGSMapView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// Provide an API Key to use this sample standalone
// AGSArcGISRuntimeEnvironment.apiKey = "<YOUR API KEY>"
let map = AGSMap(basemapStyle: .arcGISTopographic)
mapView.map = map
addFeatureCollectionLayer(to: map)
mapView.touchDelegate = self
}
}
extension ViewController {
func addFeatureCollectionLayer(to map: AGSMap) {
let geoElement = AGSGraphic(
geometry: AGSPolygon(points: [
AGSPointMakeWGS84(0, -10),
AGSPointMakeWGS84(-10, 0),
AGSPointMakeWGS84(0, 10),
AGSPointMakeWGS84(10, 0)
]),
symbol: nil,
attributes: [
"ID":"Shape 1",
"Created": Date()
]
)
let fields = [
AGSField(fieldType: .text, name: "ID", alias: "Identifier", length: 255, domain: nil, editable: true, allowNull: false),
AGSField(fieldType: .date, name: "Created", alias: "Created", length: 0, domain: nil, editable: true, allowNull: false)
]
let layer = createFeatureCollectionLayerFromGeoElements(geoElements: [geoElement], fields: fields)
map.operationalLayers.add(layer)
}
func createFeatureCollectionLayerFromGeoElements(geoElements: [AGSGeoElement], fields: [AGSField]) -> AGSFeatureCollectionLayer {
let table = AGSFeatureCollectionTable(geoElements: geoElements, fields: fields)
table.renderer = AGSSimpleRenderer(symbol: AGSSimpleFillSymbol(style: .solid, color: .orange, outline: nil))
table.displayName = "My custom GeoJSON table"
let collection = AGSFeatureCollection(featureCollectionTables: [table])
let layer = AGSFeatureCollectionLayer(featureCollection: collection)
layer.name = "My custom GeoJSON layer"
return layer
}
}
extension ViewController: AGSGeoViewTouchDelegate {
func geoView(_ geoView: AGSGeoView, didTapAtScreenPoint screenPoint: CGPoint, mapPoint: AGSPoint) {
geoView.identifyLayers(atScreenPoint: screenPoint, tolerance: 12, returnPopupsOnly: false) { [weak self] results, error in
guard let self else { return }
if let error = error {
print("Error identifying: \(error.localizedDescription)")
return
}
guard let results = results else { return }
for result in results {
self.printIdentifyResults(result: result)
}
}
}
func printIdentifyResults(result: AGSIdentifyLayerResult) {
print(result.layerContent.name)
for geoElement in result.geoElements {
print(geoElement)
print(geoElement.attributes)
}
for subResult in result.sublayerResults {
printIdentifyResults(result: subResult)
}
}
} Note that I do have some sample code for parsing GeoJSON geomety into Runtime AGSGeometry and even GeoJSON Features into AGSGeoElements available here, in case that helps, though it sounds like you're already doing that part OK: https://gist.github.com/nixta/8a5637a288ce22501aa086e6b5933adf Hope this helps.
... View more
04-03-2023
09:39 AM
|
1
|
0
|
1075
|
POST
|
Hi @ReedHunter. Which version of Runtime are you using? As of 100.13 we should be resilient to long register operations on the server and I'm surprised you're seeing timeouts there.
... View more
03-31-2023
10:48 AM
|
0
|
0
|
1217
|
POST
|
Hi Greg. Thanks for the detailed info. Looks unexpected and could be an issue with group layers. Are you able to try in ArcGIS Pro and let us know how it renders there please? Thanks! Nick.
... View more
03-20-2023
01:46 PM
|
0
|
2
|
1182
|
POST
|
And to clarify, whatever you did in 100.x will work in the 200.x Swift SDK (same patterns, for the most part you just drop the AGS from the class name). You'll just be using Swift Concurrency instead of callback blocks. You can see this example for some details too: https://developers.arcgis.com/swift/sample-code/generate-offline-map/
... View more
02-17-2023
08:50 AM
|
0
|
0
|
992
|
POST
|
Hi @DuanePfeiffer , Thanks for the feedback. This has always been a bit of complex topic and we're always keen to improve how we cover it. This documentation might help a bit. In particular, this diagram: Working offline essentially breaks down to two main approaches: Using a map (top half of the diagram). Using data and to build a map in code (bottom half of the diagram). Using a map can involve taking a web map offline from your app using the on-demand or pre-planned workflow, or by publishing a Mobile Map Package from ArcGIS Pro and opening that in your app. Using data can be done by downloading data from services (feature data, image tiled data, or vector tiled data), or by using local data files like mobile geodatabases, geopackages, shapefiles, KML files, etc. The documentation I link to above goes into more detail on those two approaches, and how you might pick one over another or combine them. Each has pros and cons. Some support editing, some don't, for example, some are more scalable for large workforces, while other provide more flexibility. Unfortunately we haven't had time yet to get Swift SDK code snippets in place in the doc. But the patterns are the same as for the 100.x Runtime SDK for iOS, so that should help. There are also topics in the Swift documentation itself: https://developers.arcgis.com/swift/offline-maps-scenes-and-data/ While that's also missing some code snippets for the time being, the patterns you can find here should help you out. For example: https://developers.arcgis.com/ios/offline-maps-scenes-and-data/download-an-offline-map-on-demand/
... View more
02-17-2023
08:46 AM
|
1
|
1
|
993
|
POST
|
Hi Ritvik, You can find 100.15 and earlier here (login required): https://developers.arcgis.com/downloads/#qt-runtime
... View more
01-17-2023
12:56 PM
|
0
|
0
|
808
|
Title | Kudos | Posted |
---|---|---|
1 | 12-09-2024 10:16 AM | |
2 | 12-11-2024 11:12 AM | |
3 | 11-25-2024 07:29 AM | |
3 | 11-25-2024 07:36 AM | |
4 | 11-25-2024 07:10 AM |