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 #531 from Esri/release/100.4.0
Browse files Browse the repository at this point in the history
Release/100.4.0
  • Loading branch information
qsmmorgan authored Oct 22, 2018
2 parents 9aa1d46 + df65248 commit 23dd92e
Show file tree
Hide file tree
Showing 251 changed files with 5,986 additions and 2,997 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
arcgis-runtime-samples-ios [![](https://esri.box.com/shared/static/km0f6q9otadygg3mkszqd4mqn4k2yo6y.svg)](https://itunes.apple.com/us/app/arcgis-runtime-sdk-for-ios/id1180714771)
ArcGIS Runtime SDK for iOS Samples [![](https://esri.box.com/shared/static/km0f6q9otadygg3mkszqd4mqn4k2yo6y.svg)](https://itunes.apple.com/us/app/arcgis-runtime-sdk-for-ios/id1180714771)
==========================
This repository contains Swift sample code demonstrating the capabilities of [ArcGIS Runtime SDK for iOS](http://developers.arcgis.com/en/ios/). The project that can be opened in Xcode and instantly run on a simulator or a device.

The ```master``` branch of this repository contains samples configured for the latest available version of [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/en/ios/). For samples configured for older versions of the SDK, look under the ```Releases``` tab for a specific version.
This repository contains Swift sample code demonstrating the capabilities of [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/ios/). The project that can be opened in Xcode and instantly run on a simulator or a device.

The ```master``` branch of this repository contains samples configured for the latest available version of [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/ios/). For samples configured for older versions of the SDK, look under the ```Releases``` tab for a specific version.

![](http://a1.mzstatic.com/us/r30/Purple111/v4/30/eb/f8/30ebf822-37e9-602e-c0da-bdb04a96239c/screen696x696.jpeg) | ![](http://a1.mzstatic.com/us/r30/Purple111/v4/0a/20/6e/0a206e52-fd59-9075-fdcb-fa48bc170b66/screen696x696.jpeg) | ![](http://a2.mzstatic.com/us/r30/Purple111/v4/6f/06/9e/6f069e2a-9da0-6694-58c6-137b8a6d0bc0/screen696x696.jpeg) | ![](http://a2.mzstatic.com/us/r30/Purple91/v4/f3/f4/9c/f3f49cea-19e8-8af4-4da5-1511f490cce7/screen696x696.jpeg)| ![](http://a2.mzstatic.com/us/r30/Purple122/v4/8c/25/ae/8c25aeec-c3a2-bd18-740f-6cc5384d4aaf/screen696x696.jpeg)
| --- | --- | --- | --- | --- |

## Features

* Maps - Open, create, inteact with and save maps
* Layers - Layer types offered by the SDK
* Features - Working with Feature layers
Expand All @@ -20,9 +21,10 @@ The ```master``` branch of this repository contains samples configured for the l
* Scenes - Display scenes, 3D symbols, and scene layers

## Requirements
* [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/en/ios/) 100.3.0 (or higher).
* Xcode 9 (or higher)
* iOS 11 SDK (or higher)

* [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/ios/) 100.4.0 (or higher).
* Xcode 10.0 (or higher)
* iOS 12 SDK (or higher)

1. Fork and then clone the repo. Don't know how? [Get started here.](http://htmlpreview.github.com/?https://github.com/Esri/esri.github.com/blob/master/help/esri-getting-to-know-github.html)
2. Build and run the project to create a single app containing all of the samples.
Expand All @@ -42,6 +44,7 @@ Find a bug or want to request a new feature? Please let us know by submitting a
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).

## Licensing

Copyright 2013 Esri

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -57,5 +60,3 @@ See the License for the specific language governing permissions and
limitations under the License.

A copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/arcgis-runtime-samples-ios/master/license.txt) file.


455 changes: 373 additions & 82 deletions arcgis-ios-sdk-samples.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3E23A9DF1AFC28F6002E2214"
BuildableName = "arcgis-ios-sdk-samples.app"
BlueprintName = "arcgis-ios-sdk-samples"
BuildableName = "ArcGIS Runtime SDK Samples.app"
BlueprintName = "ArcGIS Runtime SDK Samples"
ReferencedContainer = "container:arcgis-ios-sdk-samples.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -26,15 +26,26 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4CD2B5532142EAF900767D87"
BuildableName = "arcgis-ios-sdk-samplesTests.xctest"
BlueprintName = "arcgis-ios-sdk-samplesTests"
ReferencedContainer = "container:arcgis-ios-sdk-samples.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3E23A9DF1AFC28F6002E2214"
BuildableName = "arcgis-ios-sdk-samples.app"
BlueprintName = "arcgis-ios-sdk-samples"
BuildableName = "ArcGIS Runtime SDK Samples.app"
BlueprintName = "ArcGIS Runtime SDK Samples"
ReferencedContainer = "container:arcgis-ios-sdk-samples.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -56,8 +67,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3E23A9DF1AFC28F6002E2214"
BuildableName = "arcgis-ios-sdk-samples.app"
BlueprintName = "arcgis-ios-sdk-samples"
BuildableName = "ArcGIS Runtime SDK Samples.app"
BlueprintName = "ArcGIS Runtime SDK Samples"
ReferencedContainer = "container:arcgis-ios-sdk-samples.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand All @@ -75,8 +86,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3E23A9DF1AFC28F6002E2214"
BuildableName = "arcgis-ios-sdk-samples.app"
BlueprintName = "arcgis-ios-sdk-samples"
BuildableName = "ArcGIS Runtime SDK Samples.app"
BlueprintName = "ArcGIS Runtime SDK Samples"
ReferencedContainer = "container:arcgis-ios-sdk-samples.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AnalyzeHotspotsViewController: UIViewController, HotspotSettingsVCDelegate
(self.navigationItem.rightBarButtonItem as! SourceCodeBarButtonItem).filenames = ["AnalyzeHotspotsViewController", "HotspotSettingsViewController"]

//initialize map with basemap
let map = AGSMap(basemap: AGSBasemap.topographic())
let map = AGSMap(basemap: .topographic())

//center for initial viewpoint
let center = AGSPoint(x: -13671170.647485, y: 5693633.356735, spatialReference: AGSSpatialReference(wkid: 3857))
Expand Down Expand Up @@ -72,7 +72,7 @@ class AnalyzeHotspotsViewController: UIViewController, HotspotSettingsVCDelegate
}) { [weak self] (result: AGSGeoprocessingResult?, error: Error?) in
if let error = error {
//show error
SVProgressHUD.showError(withStatus: error.localizedDescription)
self?.presentAlert(error: error)
}
else {
//dismiss progress hud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import UIKit

protocol HotspotSettingsVCDelegate: class {
protocol HotspotSettingsVCDelegate: AnyObject {

func hotspotSettingsViewController(_ hotspotSettingsViewController: HotspotSettingsViewController, didSelectDates fromDate: String, toDate: String)
}
Expand Down Expand Up @@ -66,7 +66,7 @@ class HotspotSettingsViewController: UIViewController, UITextFieldDelegate {
self.delegate?.hotspotSettingsViewController(self, didSelectDates: self.fromTextField.text!, toDate: self.toTextField.text!)
}
else {
SVProgressHUD.showError(withStatus: "Both dates are required")
presentAlert(message: "Both dates are required")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,24 @@ class DistanceMeasurementAnalysisViewController: UIViewController, AGSGeoViewTou
// Create the scene.
scene = AGSScene(basemap: .imagery())

/// The url of the Terrain 3D ArcGIS REST Service.
let worldElevationServiceURL = URL(string: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")!
/// The url of the image service for elevation in Brest, France.
let brestElevationServiceURL = URL(string: "https://scene.arcgis.com/arcgis/rest/services/BREST_DTM_1M/ImageServer")!

// Create the surface and set it as the base surface of the scene.
let elevationSources = [
AGSArcGISTiledElevationSource(url: .worldElevationService),
AGSArcGISTiledElevationSource(url: .brestElevationService)
AGSArcGISTiledElevationSource(url: worldElevationServiceURL),
AGSArcGISTiledElevationSource(url: brestElevationServiceURL)
]
let surface = AGSSurface()
surface.elevationSources.append(contentsOf: elevationSources)
scene.baseSurface = surface

/// The url of the scene service for buildings in Brest, France.
let brestBuildingsServiceURL = URL(string: "https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer/layers/0")!
// Create the building layer and add it to the scene.
let buildingsLayer = AGSArcGISSceneLayer(url: .brestBuildingsService)
let buildingsLayer = AGSArcGISSceneLayer(url: brestBuildingsServiceURL)
scene.operationalLayers.add(buildingsLayer)

// Create the location distance measurement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!--Line Of Sight Geo Element View Controller-->
<scene sceneID="uVV-jY-ewq">
<objects>
<viewController id="beF-yn-MU6" customClass="LineOfSightGeoElementViewController" customModule="arcgis_ios_sdk_samples" sceneMemberID="viewController">
<viewController id="beF-yn-MU6" customClass="LineOfSightGeoElementViewController" customModule="arcgis_ios_sdk_samples" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="7gX-cs-H6x">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ class LineOfSightGeoElementViewController: UIViewController {
// initialize the scene with an imagery basemap
scene = AGSScene(basemap: .imageryWithLabels())

/// The url of the Terrain 3D ArcGIS REST Service.
let worldElevationServiceURL = URL(string: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")!
// initialize the elevation source and add it to the base surface of the scene
let elevationSrc = AGSArcGISTiledElevationSource(url: .worldElevationService)
let elevationSrc = AGSArcGISTiledElevationSource(url: worldElevationServiceURL)
scene.baseSurface?.elevationSources.append(elevationSrc)

/// The url of a scene service for buildings in New York, U.S.
let newYorkBuildingsServiceURL = URL(string: "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/New_York_LoD2_3D_Buildings/SceneServer/layers/0")!
// add some buildings to the scene
let sceneLayer = AGSArcGISSceneLayer(url: .newYorkBuildingsService)
let sceneLayer = AGSArcGISSceneLayer(url: newYorkBuildingsServiceURL)
scene.operationalLayers.add(sceneLayer)

// initialize a graphics overlay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class LineOfSightLocationViewController: UIViewController, AGSGeoViewTouchDelega
sceneView.analysisOverlays.add(analysisOverlay)
}
}

private let ELEVATION_SERVICE_URL = URL(string: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")!

override func viewDidLoad() {
super.viewDidLoad()
Expand All @@ -49,13 +47,15 @@ class LineOfSightLocationViewController: UIViewController, AGSGeoViewTouchDelega
(navigationItem.rightBarButtonItem as! SourceCodeBarButtonItem).filenames = ["LineOfSightLocationViewController"]

// initialize the scene with an imagery basemap
let scene = AGSScene(basemap: AGSBasemap.imagery())
let scene = AGSScene(basemap: .imagery())

// assign the scene to the scene view
sceneView.scene = scene

/// The url of the Terrain 3D ArcGIS REST Service.
let worldElevationServiceURL = URL(string: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")!
// initialize the elevation source with the service URL and add it to the base surface of the scene
let elevationSrc = AGSArcGISTiledElevationSource(url: ELEVATION_SERVICE_URL)
let elevationSrc = AGSArcGISTiledElevationSource(url: worldElevationServiceURL)
scene.baseSurface?.elevationSources.append(elevationSrc)

// set the viewpoint specified by the camera position
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import UIKit
import ArcGIS

protocol AddStatisticDefinitionsViewControllerDelegate: class {
protocol AddStatisticDefinitionsViewControllerDelegate: AnyObject {
func addStatisticDefinitions(_ statisticDefinitions: [AGSStatisticDefinition])
}

Expand All @@ -42,15 +42,10 @@ class AddStatisticDefinitionsViewController: UIViewController, UITableViewDataSo
}

private func setupUI() {
//
// Add picker options
fieldNamePicker.options = fieldNames
statisticTypePicker.options = statisticTypes

// Set fieldNamePicker's selected field
if fieldNamePicker.options.contains("POP2007"), let index = fieldNamePicker.options.index(of: "POP2007") {
fieldNamePicker.selectedIndex = index
}
}

//MARK: - TableView data source
Expand All @@ -77,7 +72,6 @@ class AddStatisticDefinitionsViewController: UIViewController, UITableViewDataSo
// MARK: - Actions

@IBAction func addStatisticDefinitionAction(_ sender: Any) {
//
// Add statistic definition
if let statisticType = AGSStatisticType(rawValue: statisticTypePicker.selectedIndex) {
let fieldName = fieldNamePicker.options[fieldNamePicker.selectedIndex]
Expand All @@ -93,7 +87,6 @@ class AddStatisticDefinitionsViewController: UIViewController, UITableViewDataSo
}

@IBAction private func doneAction() {
//
// Fire delegate
delegate?.addStatisticDefinitions(statisticDefinitions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import UIKit
import ArcGIS

protocol GroupByFieldsViewControllerDelegate: class {
protocol GroupByFieldsViewControllerDelegate: AnyObject {
func setGrouping(with fieldNames: [String])
}

class GroupByFieldsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
//

// Outlets
@IBOutlet private var tableView: UITableView!
@IBOutlet private var tableNavigationItem: UINavigationItem!
Expand Down Expand Up @@ -65,15 +65,12 @@ class GroupByFieldsViewController: UIViewController, UITableViewDataSource, UITa
//MARK: - TableView delegates

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//
// Deselect row
tableView.deselectRow(at: indexPath, animated: false)

//
// Get the cell
if let cell = tableView.cellForRow(at: indexPath) {
if cell.accessoryType == .none {
//
// Set the accessory type to checkmark
cell.accessoryType = .checkmark

Expand All @@ -82,7 +79,6 @@ class GroupByFieldsViewController: UIViewController, UITableViewDataSource, UITa
selectedFieldNames.append(fieldName)
}
else {
//
// Set the accessory type to none
cell.accessoryType = .none

Expand All @@ -96,7 +92,6 @@ class GroupByFieldsViewController: UIViewController, UITableViewDataSource, UITa
// MARK: - Actions

@IBAction private func doneAction() {
//
// Fire delegate
delegate?.setGrouping(with: selectedFieldNames)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import UIKit
import ArcGIS

protocol OrderByFieldsViewControllerDelegate: class {
protocol OrderByFieldsViewControllerDelegate: AnyObject {
func setOrdering(with orderByFields: [AGSOrderBy])
}

class OrderByFieldsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
//

// Outlets
@IBOutlet private var tableView: UITableView!
@IBOutlet private var tableNavigationItem: UINavigationItem!
Expand Down Expand Up @@ -54,7 +54,7 @@ class OrderByFieldsViewController: UIViewController, UITableViewDataSource, UITa
messageLabel.text = "Only selected Group By Fields are valid for Order By Fields so please select Group By Fields first."
messageLabel.numberOfLines = 0;
messageLabel.textAlignment = .center;
messageLabel.font = UIFont(name: "HelveticaNeue", size: 20.0)!
messageLabel.font = UIFont.systemFont(ofSize: 20)
messageLabel.sizeToFit()
tableView.backgroundView?.backgroundColor = .white
tableView.backgroundView = messageLabel;
Expand Down Expand Up @@ -100,15 +100,12 @@ class OrderByFieldsViewController: UIViewController, UITableViewDataSource, UITa
// MARK: - TableView delegates

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//
// Deselect row
tableView.deselectRow(at: indexPath, animated: false)

//
// Get the cell
if let cell = tableView.cellForRow(at: indexPath) {
if cell.accessoryType == .none {
//
// Set the accessory type to checkmark
cell.accessoryType = .checkmark

Expand All @@ -117,7 +114,6 @@ class OrderByFieldsViewController: UIViewController, UITableViewDataSource, UITa
selectedOrderByFields.append(orderByField)
}
else {
//
// Set the accessory type to none
cell.accessoryType = .none

Expand All @@ -131,7 +127,6 @@ class OrderByFieldsViewController: UIViewController, UITableViewDataSource, UITa
// MARK: - Actions

@IBAction private func doneAction() {
//
// Fire delegate
delegate?.setOrdering(with: selectedOrderByFields)

Expand Down
Loading

0 comments on commit 23dd92e

Please sign in to comment.