Skip to content

Commit 212ca22

Browse files
authored
Merge pull request #182 from Esri/v.next
Merge v.next into main for v100.15
2 parents fa94e6f + 36e0c5a commit 212ca22

File tree

17 files changed

+91
-108
lines changed

17 files changed

+91
-108
lines changed

Documentation/Bookmarks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `BookmarksTableViewController` can be created using either an `AGSGeoView` o
88

99
Clients must set the `delegate` property and implement the `bookmarksViewController:didSelect` delegate method in order to be notified when a bookmark is selected.
1010

11-
The `BookmarksTableViewController` observes changes to the `map` or `scene` property on the `AGSGeoView` and also the map or scene's `bookmarks` property and will udpate the list of bookmarks accordingly.
11+
The `BookmarksTableViewController` observes changes to the `map` or `scene` property on the `AGSGeoView` and also the map or scene's `bookmarks` property and will update the list of bookmarks accordingly.
1212

1313
## Usage
1414

Documentation/Compass/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@ When the compass is tapped, the map orients back to north (zero bearing), the de
1313
### Usage
1414

1515
```swift
16-
17-
let compass = Compass(mapView: mapView)
18-
self.view.addSubview(compass)
16+
let compass = Compass(mapView: mapView)
17+
self.view.addSubview(compass)
1918
```
2019

2120
To see it in action, try out the [Examples](../../Examples) and refer to [CompassExample.swift](../../Examples/ArcGISToolkitExamples/CompassExample.swift) in the project.
22-
23-
24-
25-

Documentation/JobManager/README.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,34 @@ The Job Manager is a toolkit component that you can just plug into the applicati
77
### Usage
88

99
```swift
10-
11-
// create and load a task
12-
let task = AGSGeodatabaseSyncTask(url: URL)
13-
task.load{ error in
14-
15-
// make sure we are still around...
16-
guard let strongSelf = self else {
17-
return
18-
}
19-
20-
// make sure task does not get released
21-
guard let strongTask = task else{
22-
return
23-
}
24-
25-
// set up params
26-
let params = AGSGenerateGeodatabaseParameters()
27-
// <param setup here>
28-
29-
// generate job
30-
let job = strongTask.generateJob(with: params, downloadFileURL: downloadURL)
31-
32-
// register the job with our JobManager shared instance
33-
JobManager.shared.register(job: job)
34-
35-
// start the job
36-
job.start(statusHandler: strongSelf.jobStatusHandler, completion: strongSelf.jobCompletionHandler)
37-
38-
}
10+
// create and load a task
11+
let task = AGSGeodatabaseSyncTask(url: URL)
12+
task.load { error in
13+
14+
// make sure we are still around...
15+
guard let strongSelf = self else {
16+
return
17+
}
18+
19+
// make sure task does not get released
20+
guard let strongTask = task else {
21+
return
22+
}
23+
24+
// set up params
25+
let params = AGSGenerateGeodatabaseParameters()
26+
// <param setup here>
27+
28+
// generate job
29+
let job = strongTask.generateJob(with: params, downloadFileURL: downloadURL)
30+
31+
// register the job with our JobManager shared instance
32+
JobManager.shared.register(job: job)
33+
34+
// start the job
35+
job.start(statusHandler: strongSelf.jobStatusHandler, completion: strongSelf.jobCompletionHandler)
36+
37+
}
3938
```
4039

4140
To see it in action, try out the [Examples](../../Examples) and refer to [JobManagerExample.swift](../../Examples/ArcGISToolkitExamples/JobManagerExample.swift) in the project.
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
# Legend View Controller
22

33
A Legend View Controller displays a legend for a set of layers in a Map or Scene contained in a MapView or SceneView. A legend conveys the meaning of the symbols used to represent features in the layer. For each layer, the legend contains a patch displaying the symbology used along with some explanatory text. The Legend View Controller is dynamic and only contains information about visible layers. As layers go in and out of scale range, or are turned on/off, the legend updates to include only those layers that are visible to the user in the MapView or SceneView.
4-
5-
64

75
### Usage
86

97
```swift
10-
11-
let legendVC = LegendViewController.makeLegendViewController(geoView: mapView)
12-
self.present(legendVC, animated:true, completion:nil)
13-
8+
let legendVC = LegendViewController.makeLegendViewController(geoView: mapView)
9+
self.present(legendVC, animated:true, completion:nil)
1410
```
1511

1612
To see it in action, try out the [Examples](../../Examples) and refer to [LegendExample.swift](../../Examples/ArcGISToolkitExamples/LegendExample.swift) in the project.
17-
18-
19-
20-

Documentation/MeasureToolbar/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ The MeasureToolbar provides an all-in-one toolbar that you can add to your appli
55
### Usage
66

77
```swift
8-
let measureToolbar = MeasureToolbar(mapView: mapView)
9-
view.addSubview(measureToolbar)
8+
let measureToolbar = MeasureToolbar(mapView: mapView)
9+
view.addSubview(measureToolbar)
1010
```
1111

1212
To see it in action, try out the [Examples](../../Examples) and refer to [MeasureExample.swift](../../Examples/ArcGISToolkitExamples/MeasureExample.swift) in the project.
13-

Documentation/Scalebar/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ The scalebar uses geodetic calculations to provide accurate measurements for map
77
### Usage
88

99
```swift
10-
let scalebar = Scalebar(mapView: mapView)
11-
scalebar.style = .alternatingBar
12-
scalebar.units = .metric
13-
scalebar.alignment = .left
14-
view.addSubview(scalebar)
10+
let scalebar = Scalebar(mapView: mapView)
11+
scalebar.style = .alternatingBar
12+
scalebar.units = .metric
13+
scalebar.alignment = .left
14+
view.addSubview(scalebar)
1515
```
1616

1717
To see it in action, try out the [Examples](../../Examples) and refer to [ScalebarExample.swift](../../Examples/ArcGISToolkitExamples/ScalebarExample.swift) in the project.

Documentation/TimeSlider/README.md

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,27 @@ User can control whether to show `Slider` and/or `Playback Buttons` using `isSli
5656
Initialize TimeSlider and add constraints to position it.
5757

5858
```swift
59-
// Configure time slider
60-
let timeSlider = TimeSlider()
61-
timeSlider.labelMode = .ticks
62-
timeSlider.addTarget(self, action: #selector(TimeSliderExample.timeSliderValueChanged(timeSlider:)), for: .valueChanged)
63-
view.addSubview(timeSlider)
64-
65-
// Add constraints to position the slider
66-
let margin: CGFloat = 10.0
67-
timeSlider.translatesAutoresizingMaskIntoConstraints = false
68-
timeSlider.bottomAnchor.constraint(equalTo: mapView.attributionTopAnchor, constant: -margin).isActive = true
69-
70-
if #available(iOS 11.0, *) {
71-
timeSlider.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: margin).isActive = true
72-
timeSlider.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -margin).isActive = true
73-
}
74-
else {
75-
timeSlider.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: margin).isActive = true
76-
timeSlider.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -margin).isActive = true
77-
}
59+
// Configure time slider
60+
let timeSlider = TimeSlider()
61+
timeSlider.labelMode = .ticks
62+
timeSlider.addTarget(self, action: #selector(TimeSliderExample.timeSliderValueChanged(timeSlider:)), for: .valueChanged)
63+
view.addSubview(timeSlider)
64+
65+
// Add constraints to position the slider
66+
let margin: CGFloat = 10.0
67+
timeSlider.translatesAutoresizingMaskIntoConstraints = false
68+
timeSlider.bottomAnchor.constraint(equalTo: mapView.attributionTopAnchor, constant: -margin).isActive = true
69+
70+
timeSlider.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: margin).isActive = true
71+
timeSlider.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -margin).isActive = true
7872
```
7973

8074
Use one of three initialize helper function to setup properties of the Time Slider.
8175

8276
```swift
83-
public func initializeTimeProperties(geoView: AGSGeoView, observeGeoView: Bool, completion: @escaping (Error?)->Void)
84-
public func initializeTimeProperties(timeAwareLayer: AGSTimeAware, completion: @escaping (Error?)->Void)
85-
public func initializeTimeSteps(timeStepCount: Int, fullExtent: AGSTimeExtent, completion: @escaping (Error?)->Void)
77+
public func initializeTimeProperties(geoView: AGSGeoView, observeGeoView: Bool, completion: @escaping (Error?)->Void)
78+
public func initializeTimeProperties(timeAwareLayer: AGSTimeAware, completion: @escaping (Error?)->Void)
79+
public func initializeTimeSteps(timeStepCount: Int, fullExtent: AGSTimeExtent, completion: @escaping (Error?)->Void)
8680
```
8781

8882
To see it in action, try out the [Examples](../../Examples) and refer to [TimeSliderExample.swift](../../Examples/ArcGISToolkitExamples/TimeSliderExample.swift) in the project.
@@ -122,5 +116,3 @@ You can customize many visual elements of the TimeSlider such as -
122116
* `layerExtentFillColor`
123117
* `trackHeight`
124118
* `theme`
125-
126-

Examples/ArcGISToolkitExamples.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
334334
GCC_WARN_UNUSED_FUNCTION = YES;
335335
GCC_WARN_UNUSED_VARIABLE = YES;
336-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
336+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
337337
MTL_ENABLE_DEBUG_INFO = YES;
338338
ONLY_ACTIVE_ARCH = YES;
339339
SDKROOT = iphoneos;
@@ -388,7 +388,7 @@
388388
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389389
GCC_WARN_UNUSED_FUNCTION = YES;
390390
GCC_WARN_UNUSED_VARIABLE = YES;
391-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
391+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
392392
MTL_ENABLE_DEBUG_INFO = NO;
393393
SDKROOT = iphoneos;
394394
SWIFT_COMPILATION_MODE = wholemodule;
@@ -405,7 +405,7 @@
405405
CLANG_ENABLE_MODULES = YES;
406406
DEVELOPMENT_TEAM = "";
407407
INFOPLIST_FILE = ArcGISToolkitExamples/Info.plist;
408-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
408+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
409409
LD_RUNPATH_SEARCH_PATHS = (
410410
"$(inherited)",
411411
"@executable_path/Frameworks",
@@ -426,7 +426,7 @@
426426
DEVELOPMENT_TEAM = "";
427427
ENABLE_TESTABILITY = YES;
428428
INFOPLIST_FILE = ArcGISToolkitExamples/Info.plist;
429-
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
429+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
430430
LD_RUNPATH_SEARCH_PATHS = (
431431
"$(inherited)",
432432
"@executable_path/Frameworks",

Examples/ArcGISToolkitExamples/ARExample.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class ARExample: UIViewController {
6767
private var toolbar = UIToolbar(frame: .zero)
6868

6969
/// Button used to display the `CalibrationView`.
70-
private let calibrationItem = UIBarButtonItem(title: "Calibration", style: .plain, target: ARExample.self, action: #selector(displayCalibration(_:)))
70+
private let calibrationItem = UIBarButtonItem(title: "Calibration", style: .plain, target: nil, action: #selector(displayCalibration(_:)))
7171

7272
/// Button used to change the current scene.
73-
private let sceneItem = UIBarButtonItem(title: "Change Scene", style: .plain, target: ARExample.self, action: #selector(changeScene(_:)))
73+
private let sceneItem = UIBarButtonItem(title: "Change Scene", style: .plain, target: nil, action: #selector(changeScene(_:)))
7474

7575
// MARK: Initialization
7676

@@ -86,7 +86,7 @@ class ARExample: UIViewController {
8686
// Set ourself as location change delegate so we can get location data source events.
8787
arView.locationChangeHandlerDelegate = self
8888

89-
// Disble user interactions on the sceneView.
89+
// Disable user interactions on the sceneView.
9090
arView.sceneView.interactionOptions.isEnabled = false
9191

9292
// Set ourself as the ARKit session delegate.
@@ -252,7 +252,7 @@ class ARExample: UIViewController {
252252
present(alertController, animated: true)
253253
}
254254

255-
/// Dislays the status view controller.
255+
/// Displays the status view controller.
256256
///
257257
/// - Parameter sender: The bar button item tapped on.
258258
@objc
@@ -406,7 +406,7 @@ extension ARExample: AGSGeoViewTouchDelegate {
406406
// We're in full-scale AR mode or have already placed the scene. Get the real world location for screen point from arView.
407407
guard let point = arView.arScreenToLocation(screenPoint: screenPoint) else { return }
408408

409-
// Create and place a graphic and shadown at the real world location.
409+
// Create and place a graphic and shadow at the real world location.
410410
let shadowColor = UIColor.lightGray.withAlphaComponent(0.5)
411411
let shadow = AGSSimpleMarkerSceneSymbol(style: .sphere, color: shadowColor, height: 0.01, width: 0.25, depth: 0.25, anchorPosition: .center)
412412
let shadowGraphic = AGSGraphic(geometry: point, symbol: shadow)
@@ -455,7 +455,7 @@ extension ARExample {
455455
case .excessiveMotion:
456456
message = "Try moving your device more slowly."
457457
case .initializing:
458-
// Because ARKit gets reset often when using continuous GPS, only dipslay initializing message if we're not in continuous tracking mode.
458+
// Because ARKit gets reset often when using continuous GPS, only display initializing message if we're not in continuous tracking mode.
459459
if let sceneInfo = currentSceneInfo, sceneInfo.trackingMode != .continuous {
460460
message = "Keep moving your device."
461461
} else {
@@ -497,7 +497,7 @@ extension ARExample {
497497
// MARK: Scene creation methods
498498
extension ARExample {
499499
//
500-
// These methods create the scenes and perform other intitialization required to set up the AR experiences.
500+
// These methods create the scenes and perform other initialization required to set up the AR experiences.
501501
//
502502

503503
/// Creates a scene based on the Streets base map.

Examples/ArcGISToolkitExamples/Misc/CalibrationView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ class CalibrationView: UIView {
129129
])
130130

131131
// Setup actions for the two sliders. The sliders operate as "joysticks", where moving the slider thumb will start a timer
132-
// which roates or elevates the current camera when the timer fires. The elevation and heading delta
132+
// which rotates or elevates the current camera when the timer fires. The elevation and heading delta
133133
// values increase the further you move away from center. Moving and holding the thumb a little bit from center
134-
// will roate/elevate just a little bit, but get progressively more the further from center the thumb is moved.
134+
// will rotate/elevate just a little bit, but get progressively more the further from center the thumb is moved.
135135
headingSlider.addTarget(self, action: #selector(headingChanged(_:)), for: .valueChanged)
136136
headingSlider.addTarget(self, action: #selector(touchUpHeading(_:)), for: [.touchUpInside, .touchUpOutside])
137137

0 commit comments

Comments
 (0)