|
POST
|
Hi Mohamad Fathin, Does this help? MapView.LocationToScreen Method Pass in any MapPoint and you get a screen position relative to the top-left corner of the MapView control. Nick.
... View more
03-05-2019
05:34 AM
|
0
|
3
|
4842
|
|
POST
|
I think that was my original reply above, which I edited to be more explicit/correct.
... View more
03-02-2019
05:56 AM
|
0
|
0
|
978
|
|
POST
|
Comment out the line AGSAuthenticationManager.shared().oAuthConfigurations.add(config). Then when you call routeTask.defaultRouteParameters you should be prompted with an alert box for your credentials instead. If you enter your credentials (it should be a free developer account or an ArcGIS Online organizational account, not a personal account), you'll be fine. I think there may be one of two things going on: 1. You're using a personal Esri account OR 2. There's an issue with how your app's OAuth configuration is being defined. But if you're entering your credentials through the OAuth page and control returns to your app, that doesn't seem likely to be the case. If it turns out to be 1) above, yes, I agree, that error message is not good and we'll have to improve that. Let me know if this helps.
... View more
03-02-2019
05:55 AM
|
0
|
0
|
2656
|
|
POST
|
That's the right URL. Should just work (I can't reproduce it here). Is your routeTask going out of scope for some reason? And which version of the Runtime SDK are you using?
... View more
02-27-2019
05:54 PM
|
0
|
1
|
2656
|
|
POST
|
Thanks for the follow-up, Worth Sparks. This is helpful info. Glad you've got a workaround. We'll take a look internally though.
... View more
02-27-2019
12:07 PM
|
1
|
1
|
3806
|
|
BLOG
|
After some discussion, the decision has been made to deprecate the ArcGIS Runtime SDK for macOS. The upcoming 100.5 update will be the last release of the dedicated Runtime SDK for macOS. As with any other release, support will be provided according to the Product Lifecycle Support Policy. It's not a decision taken lightly but, for a number of reasons, we're confident that it's the right move. Firstly: interest in the Runtime SDK for macOS has been low. By freeing up team members from maintaining it (including not just the ArcGIS Framework, but also the Samples App, guide documentation, etc.), we'll be able to implement improvements across the entire Runtime SDK family more effectively. Secondly: the decision was made easier given that developers targeting macOS as a platform still have the option of using the ArcGIS Runtime SDK for Java or ArcGIS Runtime SDK for Qt. If you are considering developing Runtime apps targeting macOS, we recommend you investigate those. If you have questions about this deprecation, feel free to use the comments section below or, if you're coming to the Developer Summit in Palm Springs, come and see us at the developer island.
... View more
02-21-2019
04:01 PM
|
0
|
0
|
1673
|
|
BLOG
|
In the options you provided… // Get Routing Result self.routeSolveWebServiceCall() OR / / Get Routing Result DispatchQueue.global().async { [weak self] in self?.routeSolveWebServiceCall() } …you do not need to dispatch the self?.routeSolveWebServicesCall() to DispatchQueue.global(). But I don't know which queue self.routeSolveWebServiceCall() is being called from in the first option. If it's not from the main thread, then you could save some code by doing this… / / Get Routing Result DispatchQueue.main.async { [weak self] in self?.routeSolveWebServiceCall() } …then Runtime will ensure the callbacks on self.routeTimeTask.solveRoute() and self.routeDistanceTask.solveRoute() will all be executed on the main thread (since you'll be calling in on it). You can then remove the other references to DispatchQueue.main.async above.
... View more
02-19-2019
09:32 AM
|
0
|
0
|
804
|
|
POST
|
When lastKnown is true, it means the location data may have been queued up or deferred by the data source. If lastKnown is false, this means that the location data is current. See the documentation on AGSLocation.lastKnown: Indicates whether the location information is current or based on a last known update (for example, in the case of deferred location updates). Last known locations are symbolized differently using AGSLocationDisplay::acquiringSymbol .
... View more
02-17-2019
03:46 PM
|
0
|
0
|
870
|
|
POST
|
The first issue is that you've embedded the dynamic framework in your app. This is fine, but if you do that, you should not also include the ArcGIS.bundle in the project hierarchy as it's included in the dynamic framework (as you can see from your first screenshot). Currently, the Guide shows how to add the static framework to your app. We will soon update the documentation to cover the dynamic framework (we used to only provide the static framework), but in the meantime please take a look at this GeoNet post. See later reply for more details. The second issue is tile requests being cancelled as you pan and zoom around the map. If you are panning and zooming quickly and the Runtime makes a request for a tile that you pan and zoom away from before the tile data response is received, Runtime cancels the request. These messages are simply reflections of those cancelations.
... View more
02-17-2019
03:41 PM
|
0
|
2
|
2107
|
|
POST
|
Thanks Worth Sparks, I think there might be something going on with additional gesture recognizers we set up which are only incidentally related to the properties exposed in AGSInteractionOptions. We'll take a look into it. In the meantime, you could work around this and extend your interaction(isEnabled) function to explicitly modify all the gesture recognizers you find and which aren't yours (as opposed to the 3 you explicitly dig up above), restoring their state when your stroke gesture completes. Or you could overlay a transparent UIView atop of the AGSMapView to capture your strokes with your custom gesture recognizer. Cheers, Nick.
... View more
02-13-2019
09:56 AM
|
0
|
4
|
3806
|
|
POST
|
Yeah. It's in your dashboard front-and-center with the new site redesign now. I'll ping you directly to make sure I'm not misunderstanding something - want to make sure a) you don't see the squished up watermark and b) I'm not confusing or complicating things for you.
... View more
02-01-2019
02:22 PM
|
0
|
1
|
3373
|
|
POST
|
Hi Michael Davis, Thanks for confirming that you also see this - that's helpful. You should not be showing a map without a license in production. That's only allowed during development and testing. See License your app—ArcGIS Runtime SDK for iOS | ArcGIS for Developers In your case, embed and use your Lite license on application startup until such time as you get a better license. I will try to reproduce the behavior here. Cheers, Nick.
... View more
02-01-2019
01:57 PM
|
0
|
3
|
3373
|
|
POST
|
Cool. Glad it's fixed it, but I might ping you directly to help us get a repro case. I should clarify since I didn't fully understand your app's flow: you don't technically need to apply a license until your code makes use of the Runtime (for most people this means showing a Map View). If you haven't yet obtained a license through a user login when you use the Runtime, you must use a license key, and in most cases that just means your Lite key. Usually it's just easiest to cover all bases with the approach you used above: use the Lite key on app init, then license appropriately whenever the login changes. I'll update my comment above to reflect this. Cheers, Nick
... View more
01-27-2019
09:10 AM
|
1
|
5
|
3373
|
|
POST
|
Is it possible that this is some other UIView that's just floating over the map view? Can you use the Debug View Hierarchy tool in Xcode to check? If not, you might try this: You will anyway have to license your app when you release/deploy it. If you're relying on a user to log in, until they log in you should use your Lite License key (which you can find in your developers dashboard) to remove the "Licensed for Developer Use Only" watermark. Set that in your UIApplicationDelegate.applicationDidFinishLaunchingWIthOptions() implementation (update: technically you could wait until you first use the Runtime in your code path to set the license, but it's almost always easiest to just follow this process and license on app initialization, then update the license whenever a user logs in or you clear cached credentials). If you do that, do you still see this artifact? We'll still need to look into it, but for a deployed app you should never display that watermark, so in practice you might never encounter the artifact.
... View more
01-25-2019
05:56 PM
|
1
|
7
|
3373
|
|
BLOG
|
The Runtime SDK does a lot of work behind the scenes to make it as simple as possible for you to write great, interactive mapping apps with fast, smooth user interfaces. Getting out of the way Key to that is making sure that when you ask Runtime to do something asynchronous (query some features, autocomplete an address, load a service definition etc.), that it gets off the thread you called from as quickly as possible and does its work on another thread. Runtime does this really well and you should never see it get in your way while it's doing something. But when it's done doing that something, which thread does Runtime use to let you know? The good news is iOS and Runtime work together so you might never have to worry about this. But you're a good developer, and you're doing some carefully thought out threading yourself, so you want to know the details, right? UI and the main thread Where you need to know which thread you're on is if you're updating your app's UI. In iOS, all UI updates must be done on the main thread (or the Main Thread Checker will come after you and your UI won't behave). So if you're not on the main thread and you want to enable that button and update that label, you need to fix that. Luckily, any time iOS enters your code because of a user interaction or view-related hook (e.g. viewDidLoad()), you will already find yourself on the main thread. For a lot of developers this means not having to worry about threading at all until they build something cpu-intensive, at which point they'll need to push that work onto another thread¹. Efficient behavior Even though Runtime will use other threads to get out of your way, there are some reasons it's better not to switch threads if possible. Context switching between threads takes up CPU cycles. There are some common workflows where even though the pattern is asynchronous, it's quite possible Runtime already has the answer for you and can hand it over immediately. In those cases, context switching would be a waste of time. Adding it all together These considerations combine to help Runtime determine how to call back to you on the various callback blocks, observers, and change handlers provided by the Runtime SDK. Here's a quick rundown of the ways the ArcGIS Runtime SDK for iOS might call back to you, and the thread you should expect to be called back on: Operation/Handler Thread Notes Explicit Calls: Async Tasks (completion blocks) e.g. Query, Solve, Geocode etc. Job Status and Results e.g. Offline Map, Geoprocessing etc. Request Operations Main | Any If you call from Main, Runtime will call back on Main. If you don't call from Main, Runtime could call back on any thread. Calling Runtime from the main thread is a pretty good indicator that you're calling because of a user interaction, so it's reasonable to expect that you'd want to update some UI when Runtime responds (and that always needs to happen on the main thread). But if you didn't call Runtime from the main thread, maybe there isn't a pair of eyes waiting for the result so Runtime skips the overhead of making sure it's back on the main thread when it responds, ensuring your robots can continue at full speed. AGSGeoViewTouchDelegate Main Runtime will always call back on Main. Just as iOS enters your code on the main thread when there's some user interaction, Runtime makes sure to do the same through the AGSGeoViewTouchDelegate. So if you're handling a user tapping on the map, for example, it's safe to update your UI directly. However, if you're observing some property that happens to be changing because of user interaction (e.g. using KVO to monitor mapScale), the "State Feedback" rule below applies. AGSLoadable Main Runtime will always call back on Main². More often than not, customer code calls into load() or retryLoad() from the main thread. If an item is already loaded, Runtime can then respond immediately with no context switching required. It makes the loadable pattern very fast for the case where, as the result of a user interaction, you need to ensure something is loaded before doing something else (e.g. determining a feature layer's renderer). In that case, only the very first interaction will incur a performance penalty, but you write your code once and it'll handle the first time or the 100th. State Feedback: Change Handlers Request Progress KVO NSProgress Any Runtime could call back on any thread. Context switching back to the main thread could mean that feedback is returned out of order or be delayed, so Runtime will provide that feedback immediately on whichever thread is current. If you need to update your UI as a result, you should dispatch your UI code to the main thread yourself with something like: DispatchQueue.main.async {
/* update the UI */
} Summary The above can largely be summarized like this: Things that update status or state (progress, KVO, etc.) can happen on any thread. Deliberate actions (Tasks and Jobs) that are called from the main thread will receive their status updates and results on the main thread. If they're called from some other thread, the thread used to respond could be any thread. AGSLoadable and AGSGeoViewTouchDelegate will always call back on the main thread. Let me know in the comments if you have questions about any of the topics brought up here. This can be a complex issue, but iOS and the Runtime SDK make sure that you usually don't need to worry about it. ¹ iOS includes a powerful thread abstraction API (Grand Central Dispatch, or GCD) that's worth learning about to help with concurrent programming and slick app experiences. Here's a great 2-part tutorial. ² Note: this load() behavior was updated at release 100.3 to provide a number of performance optimizations. Up until release 100.2.1, Runtime would promise to call back on the main thread only if you called in from the main thread (identical to the current Task/Job behavior).
... View more
01-19-2019
03:57 PM
|
3
|
2
|
2064
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-14-2026 07:07 AM | |
| 2 | 04-30-2026 10:59 AM | |
| 4 | 04-22-2026 08:07 AM | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |