|
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
|
2192
|
|
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
|
1648
|
|
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
|
896
|
|
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
|
828
|
|
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
|
2558
|
|
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
|
2147
|
|
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
|
2685
|
|
POST
|
One thought. Setting the map on the map view will proceed to load the map. Once its loaded, its spatial reference is fixed and I wonder, because you haven't set a basemap or a spatial reference, whether it's set to something that isn't the same as the WMTS layer. Tiled layers are not reprojected in Runtime so that could lead to you not being able to display the layer. Can you try calling mapView.map = map right after you set map.basemap = Basemap(wmtsLayer)? Or you could create the ArcGISMap with a spatial reference if you know what it should be: https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/mapping/ArcGISMap.html#%3Cinit%3E(com.esri.arcgisruntime.geometry.SpatialReference) Do either of those suggestions help?
... View more
05-09-2022
10:44 AM
|
0
|
1
|
2693
|
|
POST
|
If you have your point of interest geometries, you could also use GeometryEngine.combineExtents to get the minimal containing envelope. You can then pass that envelope to MapView.SetViewpointGeometryAsync() (that's a shortcut/equivalent to the method that Keith mentioned above).
... View more
05-05-2022
10:34 AM
|
0
|
1
|
1415
|
|
POST
|
Any idea why AGSPolygon.fromJSON returns NIL instead of an AGSPolygon? Yes. As I mentioned before, the REST request you're making doesn't just return a geometry. In fact it returns a set of features, including metadata. Each feature contains a geometry, but the full JSON you get back is much more than that, and you're trying to hydrate a geometry from the entire feature set JSON. I strongly recommend that you follow the queryFeaturesAndAddAsGraphics() example method I provide and do not make your own REST requests. It will simplify your life significantly. You can see on line 79 of my example code that I get the polygon of the first feature that's returned. If you need to persist that, you can call toJSON() on it. The JSON you get out of that can be used later to create a new AGSPolygon with fromJSON(). Incidentally, your call to fromJSON() is also ignoring the error that is returned.
... View more
05-02-2022
01:01 PM
|
1
|
0
|
2276
|
|
POST
|
Hi. I think you might be overthinking this a bit 🙂 The Runtime SDK takes care of a lot of this stuff for you. Take a look at this sample, and the code I've included below. But there are also some other issues: You could just display the layer directly, filtering the state you want to see with a SQL definition expression (see the code below). But if you don't want to for some reason… You are adding an AGSGraphic to the AGSMapView.graphicsOverlays collection. This expects an AGSGraphicsOverlay. See https://developers.arcgis.com/ios/swift/sample-code/add-graphics-with-symbols/ and https://developers.arcgis.com/ios/swift/sample-code/add-graphics-with-renderer/ fromJSON expects a geometry JSON in Esri JSON format. You are passing in featureset JSON in GeoJSON format. See this page for some more info. Your code could be using AGSRequestOperation which will take care of services that require authentication. Here are two options to display this state. One uses an AGSFeatureLayer and filters the contents with a where clause. The other does an explicit query to get a feature and create an AGSGraphic from it. Either way, you will need to add an API Key from your developer account to load the basemaps in this code… // Copyright 2022 Esri.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import UIKit
import ArcGIS
class ViewController: UIViewController {
@IBOutlet weak var mapView: AGSMapView! {
didSet {
mapView.graphicsOverlays.add(overlay)
}
}
let overlay = AGSGraphicsOverlay()
// Create a service feature table "linked" to the States 500K Layer
let featureTable = AGSServiceFeatureTable(url: URL(string: "https://tigerweb.geo.census.gov/arcgis/rest/services/Generalized_TAB2020/State_County/MapServer/7")!)
override func viewDidLoad() {
super.viewDidLoad()
// Visit https://developers.arcgis.com/dashboard/ to create your API key (used for basemaps)
AGSArcGISRuntimeEnvironment.apiKey = "<YOUR API KEY>"
let map = AGSMap(basemapStyle: .arcGISNavigation)
mapView.map = map
displayLayerDirectly()
// queryFeaturesAndAddAsGraphics()
}
func displayLayerDirectly() {
guard let map = mapView.map else { return }
// Use a feature layer object pointing at the service feature table
let layer = AGSFeatureLayer(featureTable: featureTable)
// The layer by default doesn't display beyond 1:4,999,999
// See https://tigerweb.geo.census.gov/arcgis/rest/services/Generalized_TAB2020/State_County/MapServer/7
layer.minScale = 0
// Explicitly define the renderer
layer.renderer = AGSSimpleRenderer(symbol: AGSSimpleFillSymbol(style: .solid, color: .orange, outline: AGSSimpleLineSymbol(style: .solid, color: .blue, width: 2.0)))
// And now limit the results returned from the layer to just Idaho
layer.definitionExpression = "STATE='16'"
map.operationalLayers.add(layer)
}
func queryFeaturesAndAddAsGraphics() {
// We will query against the service feature table to get the state feature we want…
let queryParams = AGSQueryParameters()
queryParams.whereClause = "STATE='16'"
// Perform the query (no need to make data tasks explicitly, and we'll help with authentication if need be)
featureTable.queryFeatures(with: queryParams, queryFeatureFields: .loadAll) { [weak self] result, error in
guard let self = self else { return }
if let error = error {
print("Error performing query: \(error.localizedDescription)")
return
}
guard let feature = result?.featureEnumerator().nextObject() else { return }
// The polygon is already created as the feature's geometry.
let polygon = feature.geometry
// Create a graphic from the feature.
let graphic = AGSGraphic(
geometry: polygon,
symbol: AGSSimpleFillSymbol(
style: .solid,
color: .orange,
outline: AGSSimpleLineSymbol(style: .solid, color: .blue, width: 2.0)),
attributes: feature.attributes as? [String : Any])
// Add the graphic to the overlay we already added to the map view.
self.overlay.graphics.add(graphic)
}
}
} Hope that helps.
... View more
05-02-2022
10:58 AM
|
0
|
2
|
2291
|
|
POST
|
Hi. Thanks for pointing that out. The row for Mobile geodatabase is slightly incorrect/misleading and we'll get the documentation updated. A Lite license will allow viewing of mobile geodatabases. A Basic license is required for editing. Editing data requires a Basic license except if the data is unsecured and shared publicly, in which case editing is supported with a Lite license (for a mobile geodatabase, that means it must be downloaded from an unsecured feature service).
... View more
04-26-2022
08:27 AM
|
1
|
0
|
821
|
|
POST
|
From an initial look, could you turn off the spotSoundings and let us know if that helps? They seem to be slowing things down (we'll have to look into why). Once they're off, does panning/zooming behave any differently? You should be able to get to that through the shared AGSENCEnvironmentSettings… AGSENCEnvironmentSettings.shared().displaySettings.viewingGroupSettings.spotSoundings = false
... View more
04-15-2022
12:06 PM
|
0
|
0
|
745
|
|
POST
|
Hmmm. We've taken a look and PNW does seem abnormally slow. We'll have to take a look. Thanks for reporting that.
... View more
04-15-2022
11:58 AM
|
0
|
1
|
745
|
|
POST
|
Take a look at the sample app. You can download it form the App Store and explore capabilities. Each sample shows the code behind directly in the app, but it's also available on GitHub. But if you're looking to track the current centerpoint of the map display, you can use AGSMapView.viewpointChangedHandler. You would then want to call AGSMapView.currentViewpointWithType() and pass in .centerAndScale as the type. You'll get an AGSViewpoint back, and look at the targetGeometry. It'll be an AGSPoint that's the center of the map (you'll have to cast to AGSPoint). The point's coordinates will be in the spatial reference of the map (in this case Web Mercator) which is probably not what you want to output. You'd need to project it to WGS84. We also have a AGSCoordinateFormatter class that can help. See this code for an example: mapView.viewpointChangedHandler = { [weak self] in
guard let self = self else { return }
if let center = self.mapView.currentViewpoint(with: .centerAndScale)?.targetGeometry as? AGSPoint {
// Format the Lat Lon etc. using a standard format
if let latLonString = AGSCoordinateFormatter.latitudeLongitudeString(from: center, format: .degreesMinutesSeconds, decimalPlaces: 1) {
print(latLonString)
}
// Get the coordinates manually…
if let wgs84center = AGSGeometryEngine.projectGeometry(center, to: .wgs84()) as? AGSPoint {
print("Lat \(wgs84center.y), Lon \(wgs84center.x)")
}
}
} That will output something like this to the Xcode console… 19 56 53.8N 100 32 17.0W Lat 19.948264571145458, Lon -100.53804579499798 19 58 51.9N 100 42 37.8W Lat 19.98109671769453, Lon -100.71050437417519 20 00 03.9N 100 48 55.8W Lat 20.001080434190495, Lon -100.81549113806531 20 00 25.0N 100 50 46.6W Lat 20.006942571870393, Lon -100.84629108361138 20 00 25.0N 100 50 46.7W Lat 20.006942719211626, Lon -100.84629185776355 Please note that ENC layers require a Runtime Standard License when you're ready to deploy your app.
... View more
04-15-2022
11:05 AM
|
0
|
1
|
2955
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 2 | 3 weeks ago | |
| 4 | a month ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |