|
POST
|
Hello and thank you for your question! In general when performing async/multithreaded operation, the main rule is to make sure all display/map interactions happen on the main thread. I don't see any issues doing some background/async processing of graphics and adding them to a graphics overlay, then when complete, adding the overlay to the map. Do you have any more information about your "Code=24" error or maybe a call stack? That error seems to indicate that an object was assigned to more than one parent object, which is not allowed; example: a single layer object being added to two map views, or maybe a single graphics object being added to two or more graphic overlays. If you have more information, I'm happy to take a look at it. Thanks. Mark
... View more
11-28-2017
10:09 AM
|
0
|
2
|
1231
|
|
POST
|
Hello. In order to better determine what's happening, can you tell me a bit about what you were doing at the time of the error? Were you displaying a MapView or SceneView? What kind of data was added to the map? What operations or map interactions were happening at the time? Thank you, Mark
... View more
11-28-2017
10:03 AM
|
0
|
0
|
1377
|
|
POST
|
Thank you for your question! Yes, we have fixed the attribution view on the iPhone X for our next release. As for the best way to position controls, you should only have to worry about the GeoView's attributionTopAnchor, as the attribution view should be positioned correctly: ``` var segmentedControl: UISegmentedControl = UISegmentedControl(items: ["One", "Two", "Three"]) view.addSubview(segmentedControl) segmentedControl.translatesAutoresizingMaskIntoConstraints = false segmentedControl.leadingAnchor.constraint(equalTo: mapView.leadingAnchor, constant: 0).isActive = true segmentedControl.trailingAnchor.constraint(equalTo: mapView.trailingAnchor, constant: 0).isActive = true // The "-4" gives a bit of space between the segmented control and the top of the attribution view segmentedControl.bottomAnchor.constraint(equalTo: mapView.attributionTopAnchor, constant: -4 ).isActive = true ``` Here's a video of it in action (with the forthcoming SDK version): If you have any more questions, please let us know. Mark
... View more
11-28-2017
09:59 AM
|
1
|
0
|
782
|
|
POST
|
Thank you for your question! As you've figured out, `AGSMap` has replaced `AGSWebMap` in the latest SDK. The functionality you want is still there, it's just accessed in a slightly different way. The simplest way to honor web map popup definitions is to set the `returnPopupsOnly` argument of `identifyLayer` to `true`. This will cause the identify operation to only return geoElements which have popups (and popupDefinitions). Alternately, when creating your `AGSPopup`, use the initializer which has the `popupDefinition` argument and supply the popupDefinition from the layer. Note that the layer must support the `AGSPopupSource` protocol; currently the following layers provide that support: `AGSGraphicsOverlay`, `AGSFeatureLayer`, `AGSFeatureTable`, `AGSRasterLayer`, and `AGSArcGISSublayer` If you have any additional questions, let me know. Mark
... View more
10-02-2017
09:10 AM
|
0
|
1
|
1193
|
|
POST
|
Thank you for your question! Creating a pulsing marker similar to the "current location" marker is pretty similar to the method outlined here: Make a pulse animation in AGSPictureGraphics You would create a symbol using a picture marker symbol which is a blue circle, then set up a timer to vary the size. Here's an example using a two simple marker symbol combined into an `AGSCompositeSymbol`; the size of the blue circle is changed when the timer fires: A rough outline of the code: var symbolToPulse:AGSSimpleMarkerSymbol! ... symbolToPulse = AGSSimpleMarkerSymbol(style: .circle, color: .blue, size: 18.0) let sms2 = AGSSimpleMarkerSymbol(style: .circle, color: .red, size: 12.0) let compositeSym = AGSCompositeSymbol(symbols: [symbolToPulse, sms2]) pulser = AGSGraphic(geometry: mapPoint, symbol: compositeSym, attributes: nil) ... timer = Timer.scheduledTimer(timeInterval: 0.1, target:self, selector: #selector(updateSize), userInfo: nil, repeats: true) ... let startSize: CGFloat = 18.0 let endsize: CGFloat = 36.0 ... func updateSize() { var size = symbolToPulse.size + 1.0 if size > endsize { size = startSize } symbolToPulse.size = size } Hope that helps!
... View more
08-17-2017
11:58 AM
|
3
|
0
|
1759
|
|
POST
|
Oliver, I was able to reproduce, at least in part, the memory issues you are having. I created a map with 20 `AGSArcGISMapImageLayer`s and displayed that in a mapView inside a UIViewController. I ran the test with the v100.1 SDK in both the simulator and on an iPad Air. The base memory usage was close to 300MB on the device. After panning and zooming, the memory increased until the app crashed with an out-of-memory error. It also crashed in the simulator, but only after consuming much more memory (as expected in the simulator). I did NOT see any issue with memory failing to be released after closing the view controller. In my test, I was replacing the map containing the 20 layers with a simple map: self.mapView.map = AGSMap() Since I was no longer holding onto the map with many layers nor any of the individual layers, those objects were released and the memory was freed. I am still exploring options for you to potentially reduce the memory footprint of your map, either through settings on the `AGSArcGISMapImageLayer` or on the service(s) themselves. When I have more information, I'll send it your way. As for the memory not being released when you close the view controller, I'd suggest making sure that any reference to the view controller, the map view, and especially the maps and layers are released. In the typical app, where a view controller has a map view, which contains a map with layers, if any one of those, from the VC on down, doesn't get released, then nothing below that in the chain will be released either. I'm more than happy to look at any code or snippets you are able to share to help debug your issue. Mark
... View more
08-17-2017
09:16 AM
|
0
|
0
|
2645
|
|
POST
|
Oliver, thanks for the updated information. I will attempt to reproduce the problem here, using a bunch of AGSArcGISMapImageLayers. I'll keep you posted... Mark
... View more
08-14-2017
11:59 AM
|
0
|
0
|
2645
|
|
POST
|
Thank you for your question! A couple of things about what you reported: The AGSArcGISMapImageLayer represents a dynamic map service, so there are no real "tiles" that get loaded. What does get downloaded are the images generated by the service on the fly. Those images are cached, but the caching is handled by iOS which provides a relatively small cache "space" for those, so I don't think that is the problem. What device (or simulator) are you running the app on when you experience the crash? Is it possible to share the map? If so, I can try it and diagnose the problem here. Also, have you looked at the "Memory Report" in the "Debug Navigator" inside Xcode when the app is running to determine just how much memory is being consumed? Thanks, Mark
... View more
08-09-2017
12:20 PM
|
0
|
0
|
2645
|
|
POST
|
Thank you for your question! You can take a look at this document to help install the SDK with CocoPods: Install and set up—ArcGIS Runtime SDK for iOS | ArcGIS for Developers If you're installing the latest iOS Runtime SDK, you'll want to include this line in your pod file: pod 'ArcGIS-Runtime-SDK-iOS', '100.1' Let me know if that doesn't work for you. Mark
... View more
08-03-2017
11:26 AM
|
0
|
2
|
2551
|
|
POST
|
Thank you for your questions! Regarding the viewpointChangedHandler, the best way to be notified when map navigation starts and stops is through KVO on the "navigating" property of AGSMapView. You can use the viewpointChangedHandler, but that will get called multiple times during a map navigation animation. To know when the navigation stops, use KVO: // create a private context for KVO (outside he class implementation) private var myContext = 0 // add an observer for the mapView.navigating property: mapView.addObserver(self, forKeyPath: "navigating", options: .new, context: &myContext) ... // "observe" the navigation value. This will get called whenever the map starts/stops navigating override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { if context == &myContext { if keyPath == "navigating" { print("navigation: \(mapView.isNavigating ? "Started" : "Stopped")") } } else { super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context) } } As for your app size question, there are a few reasons why the SDK is much bigger at v100.0 than at 10.2.5. Part of the reason is that there is just more code, which results in a larger SDK. The main reason, however, is that we've enabled "bitcode" when compiling/building the SDK. This results in a 3-4x larger size for the SDK. That size increase will eventually get trimmed out when downloading from the App Store. You can take a look at this Apple Documentation, which contains information on how to get files sizes for thinned apps. Exporting Your App for Testing (iOS, tvOS, watchOS) And finally, we fully support iOS versions 9.x and 10.x. Mark
... View more
08-03-2017
11:08 AM
|
3
|
0
|
1310
|
|
POST
|
Thank you for your question. Using the AGSClosestFaciltyTask is very similar to the other task-based APIs, such as the AGSRouteTask (routing) or the AGSLocatorTask (geocoding). Samples for those can be found in the ArcGIS Runtime Samples app for iOS: GitHub - Esri/arcgis-runtime-samples-ios: Swift samples demonstrating various capabilities of ArcGIS Runtime SDK for iOS Specifically, for routing: arcgis-runtime-samples-ios/FindRouteViewController.swift at master · Esri/arcgis-runtime-samples-ios · GitHub And for geocoding: arcgis-runtime-samples-ios/FindAddressViewController.swift at master · Esri/arcgis-runtime-samples-ios · GitHub If those don't help, please post the code you're having problems with and I'll take a look. Cheers, Mark
... View more
08-03-2017
10:37 AM
|
0
|
0
|
637
|
|
POST
|
I don't see it in your code above, but make sure you are adding the graphics overlay to the map view: self.mapView.graphicsOverlays.add(aPNsGraphicsLayer) Also, double check that the map is loaded when you're adding the layer; if it's not loaded yet, the extent may be off.
... View more
08-03-2017
09:37 AM
|
1
|
0
|
1109
|
|
POST
|
Alexander, No problem, that's cool with me. Glad you could use the code! Cheers, Mark
... View more
07-20-2017
08:19 AM
|
1
|
0
|
2177
|
|
POST
|
Thank you for your question. There is no current way to get the magnifier to show when adding a new vertex. However, if you tap to add a new vertex, then tap and hold on the new vertex, the magnifier will show and you can reposition the vertex. Adding a new vertex using the magnifier is something that we are considering for the next release. Currently there is no public API to get the selected vertex of a sketch. Aside from needing the selected vertex for the workaround you mention above, is there a use case for you needing to get the selected vertex? If so, that is also something we could consider. Mark
... View more
07-19-2017
09:10 AM
|
0
|
0
|
768
|
|
POST
|
The code to change the opacity of the graphics overlay and the size of the marker symbol will be similar on Android. I'm not familiar enough with it to say if Android has a similar timer to iOS, but I image they do. If you need more help with that, please post a question on the Runtime Android forum, here: https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-android
... View more
07-18-2017
08:13 AM
|
1
|
2
|
2177
|
| 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
|