|
POST
|
Maximo Mobile, We are going to be releasing some 10.2.5 Objective-C sample code that has been ported to version 100.0.0. A potentially very helpful aspect of this will be that you will be able to easily run a diff between the 10.2.5 sample code and the v100.0.0 sample code as they will both be in a github repository. Stay tuned - we are working very hard to get this out ASAP. thanks
... View more
12-06-2016
08:51 AM
|
0
|
2
|
2108
|
|
POST
|
here is a decent thread on the topic: App Transport Security REQUIRED January 2017 | Apple Developer Forums
... View more
12-06-2016
08:38 AM
|
0
|
0
|
1099
|
|
POST
|
The only thing I can think of is that you are somehow referencing an old version of the sdk. Have you followed the steps in the documentation for setting up your project with the 100.0.0 version of the framework?
... View more
12-02-2016
08:40 AM
|
0
|
0
|
2697
|
|
POST
|
Is your project settings set to use swift 3.0 or swift 2.3?
... View more
12-01-2016
10:34 AM
|
0
|
2
|
2697
|
|
POST
|
With swift 3 the code would look like this to do a query against a ServiceFeatureTable. Make sure to hold a reference to the ServiceFeatureTable so that it doesn't go out of scope and get deallocd before the request is finished. sft = AGSServiceFeatureTable(url: URL(string: "https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0")!)
sft.featureRequestMode = .onInteractionNoCache
let qp = AGSQueryParameters()
qp.whereClause = "req_type = 'Sidewalk and Curb Issues'"
sft.queryFeatures(with: qp, fields: .loadAll){ result, error in
if let error = error {
print("error querying: \(error)")
}
else{
print("result: \(result)")
let enumerator = result?.featureEnumerator()
while let feature = enumerator?.nextObject(){
print("feature: \(feature)")
}
}
}
... View more
11-22-2016
03:01 PM
|
1
|
0
|
1053
|
|
POST
|
Nicholas is correct. The other thing is with Quartz you may not need to know when your layer loads - depending on why you were listening for the load delegate. If it was for authentication purposes then the new AGSAuthenticationManager will handle that for you.
... View more
11-22-2016
02:25 PM
|
1
|
0
|
962
|
|
POST
|
Also - when you assign the map to the mapView - the mapView will start loading the map. If you were to call loadWithCompletion anytime after that, it's totally fine. It will either call back immediately if loading was done or failed or it will wait for currently in progress load to happen and call you back.
... View more
11-22-2016
02:10 PM
|
1
|
0
|
1140
|
|
POST
|
James, The `AGSMap` class is `AGSLoadable`. This means you can call the `loadWithCompletion:` method on instances of `AGSMap` The AGSLoadable `loadWithCompetion` doc is this: ``` /** Loads data for the object asynchronously. The completion block is invoked upon completion. You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once. @param completion block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. @since 100 @see `#cancelLoad` to cancel loading @see `#retryLoadWithCompletion:` to force reload */ ``` in swift 3 the code would look like so: ``` mapView.map?.load(){ error in if let error = error { print("error loading map: \(error)") } else{ print("map loaded successfully") } } ``` in objective-c: ``` [self.mapView.map loadWithCompletion:^(NSError * _Nullable error) { if (error){ NSLog(@"error loading: %@", error); } else{ NSLog(@"map loaded successfully"); } }]; ``` Many objects in 100.0.0 are AGSLoadable and have the same behavior.
... View more
11-22-2016
02:08 PM
|
1
|
0
|
1140
|
|
POST
|
It has been removed in favor of KVO on the `drawStatus` property: ``` import UIKit import ArcGIS private var myKVOContext = 0 class ViewController: UIViewController { let mapView = AGSMapView(frame: CGRect.zero) override func viewDidLoad() { super.viewDidLoad() mapView.frame = view.bounds mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight] view.addSubview(mapView) mapView.map = AGSMap(basemapType: .streets, latitude: 0, longitude: 0, levelOfDetail: 0) mapView.addObserver(self, forKeyPath: "drawStatus", options: .new, context: &myKVOContext) } override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { if context == &myKVOContext{ if keyPath == "drawStatus"{ print("drawStatus changed: \(mapView.drawStatus.rawValue)") } } else{ super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context) } } } ```
... View more
11-22-2016
11:05 AM
|
1
|
0
|
1382
|
|
POST
|
use the `attributionTextVisible` property instead now at final.
... View more
11-22-2016
10:57 AM
|
0
|
0
|
850
|
|
POST
|
James, There is a migration doc in progress. As soon as it is ready it will be made available. Also coming soon to github are the 10.2.x objective-c samples that have been ported to quartz so you can compare how to do things at 10.2.x to how you do the same in quartz. thanks, Ryan
... View more
11-22-2016
10:33 AM
|
1
|
1
|
737
|
|
POST
|
try this code for swift 3 ``` mapView.exportImage { (image, error) in if let error = error{ print("error: \(error)") } else if let image = image{ print("image exported!") } } ``` this for swift 2.3: ``` self.mapView?.exportImageWithCompletion({ (image, error) in if let error = error { print("error: \(error)") } else if let image = image{ print("success!") } }) ```
... View more
11-22-2016
10:17 AM
|
0
|
4
|
2697
|
|
POST
|
Can you try turning hit-testing off on a per-layer basis to narrow down what layer is causing the crash?
... View more
07-18-2016
09:05 AM
|
0
|
3
|
2805
|
|
POST
|
did you add the ArcGIS.bundle file to your project? If not, the magnifier probably won't show as it needs the image which is in the bundle.
... View more
07-18-2016
09:03 AM
|
2
|
0
|
810
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-21-2025 11:36 AM | |
| 1 | 01-13-2025 02:52 PM | |
| 1 | 12-04-2018 09:10 AM | |
| 1 | 07-08-2021 07:45 AM | |
| 1 | 06-14-2021 08:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-31-2026
09:20 AM
|