Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1072 from Esri/v.next
Browse files Browse the repository at this point in the history
Release 100.11.1
  • Loading branch information
yo1995 authored May 21, 2021
2 parents 77619fa + 60c2064 commit 61c82de
Show file tree
Hide file tree
Showing 41 changed files with 930 additions and 185 deletions.
30 changes: 24 additions & 6 deletions arcgis-ios-sdk-samples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@
F16922B225158B1E00A8F36E /* EditKMLGroundOverlay.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F16922B125158B1E00A8F36E /* EditKMLGroundOverlay.storyboard */; };
F16922B525158B4400A8F36E /* EditKMLGroundOverlayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16922B425158B4400A8F36E /* EditKMLGroundOverlayViewController.swift */; };
F16922B7251590E200A8F36E /* EditKMLGroundOverlayViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F16922B425158B4400A8F36E /* EditKMLGroundOverlayViewController.swift */; };
F1710AF025EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1710AEF25EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift */; };
F1710AF325EED01600900FF2 /* DisplayContentUtilityNetworkContainer.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1710AF225EED01600900FF2 /* DisplayContentUtilityNetworkContainer.storyboard */; };
F1710AF525EEF4C000900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F1710AEF25EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift */; };
F17961A124DA3A27006FE7C1 /* EditFeaturesWithFeatureLinkedAnnotationViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F1124F0B24CFA97000E672EC /* EditFeaturesWithFeatureLinkedAnnotationViewController.swift */; };
F1987CFD23F7313E00DF41CC /* FindClosestFacilityInteractiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1987CFC23F7313E00DF41CC /* FindClosestFacilityInteractiveViewController.swift */; };
F1987CFF23F7321400DF41CC /* FindClosestFacilityInteractiveViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F1987CFC23F7313E00DF41CC /* FindClosestFacilityInteractiveViewController.swift */; };
Expand Down Expand Up @@ -921,6 +924,7 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
F1710AF525EEF4C000900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift in CopyFiles */,
F11CED76256C8BD3002A3F56 /* ShowLabelsOnLayer3DViewController.swift in CopyFiles */,
00F359C725F2F27500A7C880 /* CreateLoadReportViewController.swift in CopyFiles */,
009B600325E5DB4700BB9A77 /* CreateSymbolStylesFromWebStylesViewController.swift in CopyFiles */,
Expand Down Expand Up @@ -1782,6 +1786,8 @@
F164997A22E924F40088CA93 /* EditAndSyncFeaturesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditAndSyncFeaturesViewController.swift; sourceTree = "<group>"; };
F16922B125158B1E00A8F36E /* EditKMLGroundOverlay.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = EditKMLGroundOverlay.storyboard; sourceTree = "<group>"; };
F16922B425158B4400A8F36E /* EditKMLGroundOverlayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditKMLGroundOverlayViewController.swift; sourceTree = "<group>"; };
F1710AEF25EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DisplayContentUtilityNetworkContainerViewController.swift; path = "arcgis-ios-sdk-samples/Utility Network/Display content of utility network container/DisplayContentUtilityNetworkContainerViewController.swift"; sourceTree = SOURCE_ROOT; };
F1710AF225EED01600900FF2 /* DisplayContentUtilityNetworkContainer.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = DisplayContentUtilityNetworkContainer.storyboard; path = "arcgis-ios-sdk-samples/Utility Network/Display content of utility network container/DisplayContentUtilityNetworkContainer.storyboard"; sourceTree = SOURCE_ROOT; };
F1987CFC23F7313E00DF41CC /* FindClosestFacilityInteractiveViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindClosestFacilityInteractiveViewController.swift; sourceTree = "<group>"; };
F1987CFE23F7314000DF41CC /* FindClosestFacilityInteractive.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = FindClosestFacilityInteractive.storyboard; sourceTree = "<group>"; };
F1987D0223F7677E00DF41CC /* DisplaySubtypeSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplaySubtypeSettingsViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3166,7 +3172,7 @@
3ED028101B8E3A8400ACA70D /* Change viewpoint */,
3ED028331B8E3A8500ACA70D /* Map rotation */,
3ED0284D1B8E3A8500ACA70D /* Show magnifier */,
3ED028181B8E3A8400ACA70D /* Display device location */,
3ED028181B8E3A8400ACA70D /* Display device location with autopan modes */,
3ED028521B8E3A8500ACA70D /* Take screenshot */,
3ED028011B8E3A8400ACA70D /* Create and save a map */,
3E6C77141CCFC33100E89873 /* Identify layers */,
Expand Down Expand Up @@ -3218,14 +3224,14 @@
path = "Change viewpoint";
sourceTree = "<group>";
};
3ED028181B8E3A8400ACA70D /* Display device location */ = {
3ED028181B8E3A8400ACA70D /* Display device location with autopan modes */ = {
isa = PBXGroup;
children = (
3ED0281A1B8E3A8400ACA70D /* DisplayLocation.storyboard */,
3ED0281B1B8E3A8400ACA70D /* DisplayLocationViewController.swift */,
C7237D0D2190F07500A72C76 /* DisplayLocationSettingsViewController.swift */,
);
path = "Display device location";
path = "Display device location with autopan modes";
sourceTree = "<group>";
};
3ED028201B8E3A8400ACA70D /* Display drawing status */ = {
Expand Down Expand Up @@ -4203,6 +4209,7 @@
D98CC08F22E25D8200618682 /* Utility network */ = {
isa = PBXGroup;
children = (
F1710AEE25EECFB100900FF2 /* Display content of utility network container */,
0069F4B825F0110900CA7BD2 /* Create load report */,
F14A8EFC2474AD3A00242D96 /* Configure subnetwork trace */,
F1D50229245243AD00583CFB /* Display utility associations */,
Expand Down Expand Up @@ -4476,6 +4483,15 @@
path = "Edit KML ground overlay";
sourceTree = "<group>";
};
F1710AEE25EECFB100900FF2 /* Display content of utility network container */ = {
isa = PBXGroup;
children = (
F1710AEF25EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift */,
F1710AF225EED01600900FF2 /* DisplayContentUtilityNetworkContainer.storyboard */,
);
path = "Display content of utility network container";
sourceTree = "<group>";
};
F1A94D0F23F46FBF003E17B8 /* Find closest facility to an incident (interactive) */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4838,6 +4854,7 @@
C76F757421827C9C00938D8D /* ColorPicker.storyboard in Resources */,
D97B7E621FD9BFE700E1239D /* Subdivisions.sbn in Resources */,
3ED028691B8E3A8500ACA70D /* SetViewpoint.storyboard in Resources */,
F1710AF325EED01600900FF2 /* DisplayContentUtilityNetworkContainer.storyboard in Resources */,
3EFCE1BD1CF36BC100E02F67 /* OpenMobileMapPackage.storyboard in Resources */,
9DF04DC02304C7F50014C1EE /* DownloadPreplannedMap.storyboard in Resources */,
166E8F9D1EE62E0E00C57C46 /* RasterLayer.storyboard in Resources */,
Expand Down Expand Up @@ -5163,6 +5180,7 @@
003BC31224E5E53200F65746 /* ConfigureSubnetworkTraceViewController.swift in Sources */,
3EEA06101D21C44000E03774 /* DisplaySceneViewController.swift in Sources */,
001D342F251BF94600F9EEBE /* ViewHiddenInfrastructureARExplorerViewController.swift in Sources */,
F1710AF025EECFDD00900FF2 /* DisplayContentUtilityNetworkContainerViewController.swift in Sources */,
4C0FD7CF22652E3B0042DE31 /* ReadSymbolsFromMobileStyleSymbolViewController.swift in Sources */,
10859BAC1FE0AAE400F6E552 /* FeatureLayerExtrusionViewController.swift in Sources */,
C7FF07D621B9D258000D4055 /* FeatureLayerRenderingModeSceneViewController.swift in Sources */,
Expand Down Expand Up @@ -5564,7 +5582,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 100.11.0;
MARKETING_VERSION = 100.11.1;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "com.esri.arcgis-ios-sdk-samples";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5593,7 +5611,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 100.11.0;
MARKETING_VERSION = 100.11.1;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "com.esri.arcgis-ios-sdk-samples";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -5699,7 +5717,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Esri/arcgis-runtime-toolkit-ios";
requirement = {
kind = upToNextMajorVersion;
kind = upToNextMinorVersion;
minimumVersion = 100.11.0;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This sample only uses the `arScreenToLocation` approach, as it is the only way t

Note that unlike other scene samples, a basemap isn't shown most of the time, because the real world provides the context. Only while calibrating is the basemap displayed at 50% opacity, to give the user a visual reference to compare to.

**Real-scale AR** is one of three main patterns for working with geographic information in augmented reality. See the topic [Display scenes in augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the iOS Guide for more information.
**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. See the topic [Display scenes in augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the *ArcGIS Developers* guide for more information.

See the 'Edit feature attachments' sample for more specific information about the attachment editing workflow.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,15 @@ extension NavigateARNavigatorViewController: AGSLocationChangeHandlerDelegate {
func locationDataSource(_ locationDataSource: AGSLocationDataSource, locationDidChange location: AGSLocation) {
startButtonItem.isEnabled = true
// Send location updates to route tracker if actively navigating.
routeTracker?.trackLocation(location)
routeTracker?.trackLocation(location) { [weak self] error in
guard let self = self else { return }
if let error = error {
// Display error message and stop further route tracking if it
// fails due to data format, licensing issue, etc.
self.setStatus(message: error.localizedDescription)
self.routeTracker = nil
}
}
}
}

Expand Down
10 changes: 9 additions & 1 deletion arcgis-ios-sdk-samples/Content Display Logic/ContentPList.plist
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</dict>
<dict>
<key>displayName</key>
<string>Display device location</string>
<string>Display device location with autopan modes</string>
<key>storyboardName</key>
<string>DisplayLocation</string>
<key>descriptionText</key>
Expand Down Expand Up @@ -1836,6 +1836,14 @@
<key>storyboardName</key>
<string>CreateLoadReport</string>
</dict>
<dict>
<key>displayName</key>
<string>Display content of utility network container</string>
<key>storyboardName</key>
<string>DisplayContentUtilityNetworkContainer</string>
<key>descriptionText</key>
<string>A utility network container allows a dense collection of features to be represented by a single feature, which can be used to reduce map clutter.</string>
</dict>
</array>
</dict>
<dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RelatedFeaturesViewController: UITableViewController {
parameters.orderByFields = [AGSOrderBy(fieldName: "OBJECTID", sortOrder: .descending)]

// query for species related to the selected park
self.originFeatureTable.queryRelatedFeatures(for: self.originFeature, parameters: parameters) { [weak self] (results: [AGSRelatedFeatureQueryResult]?, error: Error?) in
self.originFeatureTable.queryRelatedFeatures(for: self.originFeature, parameters: parameters, queryFeatureFields: .loadAll) { [weak self] (results: [AGSRelatedFeatureQueryResult]?, error: Error?) in
// dismiss progress hud
UIApplication.shared.hideProgressHUD()

Expand Down Expand Up @@ -130,15 +130,19 @@ class RelatedFeaturesViewController: UITableViewController {
// show progress hud
UIApplication.shared.showProgressHUD(message: "Applying edits")

relatedTable.applyEdits { [weak self] (_, error) in
relatedTable.applyEdits { [weak self] (results, error) in
UIApplication.shared.hideProgressHUD()

if let error = error {
// show error
self?.presentAlert(error: error)
} else {
// query to update features
self?.queryRelatedFeatures()
guard let self = self else { return }
if let results = results {
if let firstResult = results.first,
firstResult.completedWithErrors {
// The edit fails with error.
self.presentAlert(error: firstResult.error!)
}
// Query to update features in the table.
self.queryRelatedFeatures()
} else if let error = error {
self.presentAlert(error: error)
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions arcgis-ios-sdk-samples/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@
<false/>
</dict>
</dict>
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.bad-elf.gps</string>
<string>com.eos-gnss.positioningsource</string>
<string>com.geneq.sxbluegpssource</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ class DisplaySubtypeFeatureLayerViewController: UIViewController {
self.originalRenderer = self.subtypeSublayer?.renderer
self.subtypeSublayer?.labelsEnabled = true
self.settingsButton.isEnabled = true
do {
let label = try self.makeLabelDefinition()
self.subtypeSublayer?.labelDefinitions.append(label)
} catch {
self.presentAlert(error: error)
}
// Make and add the labels.
let label = self.makeLabelDefinition()
self.subtypeSublayer?.labelDefinitions.append(label)
}
}
}
Expand All @@ -65,36 +62,22 @@ class DisplaySubtypeFeatureLayerViewController: UIViewController {
return map
}

private func makeLabelDefinition() throws -> AGSLabelDefinition {
private func makeLabelDefinition() -> AGSLabelDefinition {
// Make and stylize the text symbol.
let textSymbol = AGSTextSymbol()
textSymbol.angle = 0
textSymbol.backgroundColor = .clear
textSymbol.outlineColor = .white
textSymbol.color = .blue
textSymbol.haloColor = .white
textSymbol.haloWidth = 2
textSymbol.horizontalAlignment = .center
textSymbol.verticalAlignment = .middle
textSymbol.isKerningEnabled = false
textSymbol.offsetX = 0
textSymbol.offsetY = 0
textSymbol.fontDecoration = .none
textSymbol.size = 10.5
textSymbol.fontStyle = .normal
textSymbol.fontWeight = .normal
let textSymbolJSON = try textSymbol.toJSON()

// Make a JSON object.
let labelJSONObject: [String: Any] = [
"labelExpression": "[nominalvoltage]",
"labelPlacement": "esriServerPointLabelPlacementAboveRight",
"useCodedValues": true,
"symbol": textSymbolJSON
]

let result = try AGSLabelDefinition.fromJSON(labelJSONObject)
return result as! AGSLabelDefinition
// Make a label definition and adjust its properties.
let labelDefinition = AGSLabelDefinition()
labelDefinition.expression = AGSSimpleLabelExpression(simpleExpression: "[nominalvoltage]")
labelDefinition.placement = .pointAboveRight
labelDefinition.useCodedValues = true
labelDefinition.textSymbol = textSymbol
return labelDefinition
}

// The formatter used to generate strings from scale values.
Expand All @@ -113,7 +96,7 @@ class DisplaySubtypeFeatureLayerViewController: UIViewController {
currentScaleLabel.text = "Current scale: " + updatedText
}

override func viewDidLoad() {
override func viewDidLoad() {
super.viewDidLoad()

mapScaleObservation = mapView.observe(\.mapScale, options: .initial) { [weak self] (_, _) in
Expand All @@ -128,7 +111,7 @@ class DisplaySubtypeFeatureLayerViewController: UIViewController {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
super.prepare(for: segue, sender: sender)
if let navController = segue.destination as? UINavigationController,
let controller = navController.topViewController as? DisplaySubtypeSettingsViewController {
let controller = navController.topViewController as? DisplaySubtypeSettingsViewController {
controller.map = mapView?.map
controller.mapScale = mapView.mapScale
controller.minScale = subtypeSublayer.minScale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The sample loads with the sublayer visible on the map. Toggle its visibility by
1. Create an `AGSSubtypeFeatureLayer` from an `AGSServiceFeatureTable` that defines a subtype, and add it to the `AGSMap`.
2. Get an `AGSSubtypeSublayer` from the subtype feature layer using its name.
3. Enable the sublayer's labels and define them with `AGSLabelDefinition`.
* Use `AGSSimpleLabelExpression` to set the expression for label definitions.
4. Make a switch to toggle the sublayer's visibility.
5. Create an alternate renderer by making an `AGSSimpleRenderer`.
6. Get the current map scale and make it the minimum map scale.
Expand All @@ -26,13 +27,18 @@ The sample loads with the sublayer visible on the map. Toggle its visibility by

* AGSLabelDefinition
* AGSServiceFeatureTable
* AGSSimpleLabelExpression
* AGSSubtypeFeatureLayer
* AGSSubtypeSublayer

## About the data

The [feature service layer](https://sampleserver7.arcgisonline.com/server/rest/services/UtilityNetwork/NapervilleElectric/FeatureServer/0) in this sample represents an electric network in Naperville, Illinois, which contains a utility network with asset classification for different devices.

## Additional information

Help regarding the Arcade label expression script for defining a label definition can be found on the [ArcGIS Developers](https://developers.arcgis.com/arcade/) site.

## Tags

asset group, feature layer, labeling, sublayer, subtype, symbology, utility network, visible scale range
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
"visible scale range",
"AGSLabelDefinition",
"AGSServiceFeatureTable",
"AGSSimpleLabelExpression",
"AGSSubtypeFeatureLayer",
"AGSSubtypeSublayer"
],
"redirect_from": [],
"relevant_apis": [
"AGSLabelDefinition",
"AGSServiceFeatureTable",
"AGSSimpleLabelExpression",
"AGSSubtypeFeatureLayer",
"AGSSubtypeSublayer"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Esri now hosts an [OpenStreetMap vector layer on ArcGIS Online](https://www.arcg

## Tags

basemap style, layers, map, open, OpenStreetMap, OSM, street
basemap, layers, map, open, OpenStreetMap, OSM, street
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"keywords": [
"OSM",
"OpenStreetMap",
"basemap style",
"basemap",
"layers",
"map",
"open",
Expand Down
Loading

0 comments on commit 61c82de

Please sign in to comment.