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
|
1027
|
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
|
936
|
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
|
1059
|
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
|
1027
|
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
|
853
|
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
|
854
|
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
|
686
|
POST
|
Hi, The Mobile Map Package is best considered as a black box. You don't need to worry about exactly how the network dataset is packaged up in there (though I expect that some form of geodatabase and .tn file is in there somewhere 😀). The key part really is knowing how to load it into a RouteTask. But in short, yes, if the Pro Map has a transportation network, then it'll be included in the Mobile Map Package as part of the support data for the packaged map. You can find a little more information here: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-mobile-map-package.htm
... View more
01-03-2023
09:24 AM
|
1
|
1
|
887
|
POST
|
Hello, and happy new year! You need to package your network dataset in a Mobile Map Package containing the map with the network dataset. With ArcMap you used to be able to export a network dataset for Runtime SDK use, but with Pro we moved to a map package approach since more often than not you'll want to use the network dataset with a map or maps (but don't worry, you don't have to use/display the map if your workflow doesn't require it - in that case the MMPK and Map are just delivery mechanisms for the network dataset). Load the MobileMapPackage, use the Maps property to read and load the ArcGISMap, and then read the TransportationNetworkDataset(s) from the map. You can then create a RouteTask from each TransportationNetworkDataset. Hope that helps!
... View more
01-03-2023
08:23 AM
|
1
|
1
|
890
|
POST
|
Aha. Because you had posted this to the Java SDK forum, we assumed you were interested in Android, and since you asked about 200, that means the Kotlin SDK (hence we moved this to this Community place). At 100.x the SDKs that target mobile devices (iOS/iPadOS, Android) have AR Toolkit components. At 200.x, that will be the case too, but we haven't implemented that for all the SDKs quite yet. As you found, .NET has it already (although the MAUI stuff is here https://github.com/Esri/arcgis-toolkit-dotnet/tree/main/src/ARToolkit.Maui), as does Qt - those were just updates to existing toolkit components. However, Swift and Kotlin do not since that's more work to create from scratch, but it's on the roadmap. So: you can do AR with the 200.0 ArcGIS Maps SDKs for .NET and Qt now, but you'll have to wait before you can do it with the ArcGIS Maps SDKs for Swift or Kotlin. The ArcGIS Maps SDK for Java does not target iOS or Android devices, so no AR there. Does that help?
... View more
12-16-2022
02:59 PM
|
2
|
0
|
982
|
POST
|
Hi @VHolubec, It's on the roadmap, but probably won't be ready by the next release (200.1). I can't promise anything, but I could see it coming sometime in 2023.
... View more
12-16-2022
11:16 AM
|
1
|
0
|
995
|
POST
|
You could try distanceGeodetic(). That gives you the distance and azimuth between two points.
... View more
11-17-2022
02:28 PM
|
1
|
1
|
465
|
POST
|
Yes, you can develop and deploy an app built with any ArcGIS Runtime SDK for free. You will need to have a Developer Account (also free) and get your Lite license string from the License page. Note that if your app's needs Runtime capabilities that are not available at Lite level, then you will need to purchase appropriate Base or Standard licenses (Advanced level is not relevant to the iOS SDK). And of course there may be costs for using Location Services over the free monthly allowances.
... View more
11-10-2022
07:56 AM
|
0
|
0
|
400
|
POST
|
Hi @Anonymous User I need offline street and satellite elevation maps with routing for about a dozen countries. I have a few questions: 1. I understand that I need ArcGIS Publisher. But what version of ArcGIS Pro do I need? Pro Basic, Pro Standard, or Pro Advanced? The Publisher extension for ArcGIS Pro is only needed if you want to create an offline map package for anonymous use in our Field Apps such as Field Maps. Map and scene packages (MMPKs/MSPKs) combine multiple data sources and layer definitions in one ready-to-read map or scene definition, and ArcGIS Maps SDKs for Game Engines cannot yet read them. Instead, the Game Engine SDKs can read Scene Layer Packages (SLPKs) and Tile Packages (TPKs/TPKXs), each of which provides data for a single layer, which you can use to construct your ArcGIS Map. Those SLPKs, TPKs and TPKXs can be created in any version ArcGIS Pro (without a Publisher extension). You can use ArcGIS Pro to create a Scene Layer Package of 3D Object data or Integrated Mesh data, or a Tile Package of basemap data or LERC-encoded elevation data. 2. After I create the offline maps that are accessible through Unity, do individual users need ArcGIS subscriptions or are those offline maps covered by my subscription? They do not, no. Just distribute and use the SLPK/TPK/TPKX files and consume them in your app. As always, make sure you're honoring the data usage rights for the data you're including in your offline packages. 3. Is there any documentation or examples of how I access these offline maps from within Unity? Yes... https://developers.arcgis.com/unity/maps/tutorials/display-a-map-api/ Just reference the locally stored file instead of the service when creating each Layer. See these links for more info: https://developers.arcgis.com/unreal-engine/layers/#set-a-basemap https://developers.arcgis.com/unreal-engine/maps/elevation/#set-elevation 4. Does it matter whether maps are online or offline for routing? At this time, routing in the ArcGIS Maps SDKs for Game Engines requires a connection to a routing service. However, the map layers themselves on which you overlay the route results can be any combination of online or offline layers. The two things (routing and layers) are distinct. 5. Do individual users need ArcGIS subscriptions to do routing, or can I use my API key? They do not need ArcGIS Subscriptions, no. You can use your API Key to deliver solutions that do routing (you get 20,000 routes for free per month). Depending on the nature of the app, and the target users, some developers choose to require/let their users use their ArcGIS Subscription, and you can certainly do that, but it's not a consumer-oriented approach. If your target users are not already ArcGIS subscribers, then an API Key is the appropriate approach. Hope that helps!
... View more
11-07-2022
07:43 AM
|
1
|
0
|
837
|
Title | Kudos | Posted |
---|---|---|
1 | 10-03-2024 04:31 PM | |
2 | 10-03-2024 03:16 PM | |
1 | 10-02-2024 04:25 PM | |
1 | 09-24-2024 08:52 AM | |
1 | 09-16-2024 10:25 AM |