diff --git a/README.md b/README.md index 495889257..631016de9 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ The ```main``` branch of this repository contains samples configured for the lat ## Requirements -* [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/ios/) 100.12.0 (or newer) -* [ArcGIS Runtime Toolkit for iOS](https://github.com/Esri/arcgis-runtime-toolkit-ios) 100.12.0 (or newer) -* Xcode 12.0 (or newer) +* [ArcGIS Runtime SDK for iOS](https://developers.arcgis.com/ios/) 100.13.0 (or newer) +* [ArcGIS Runtime Toolkit for iOS](https://github.com/Esri/arcgis-runtime-toolkit-ios) 100.13.0 (or newer) +* Xcode 13.0 (or newer) The *ArcGIS Runtime SDK Samples app* has a *Target SDK* version of *13.0*, meaning that it can run on devices with *iOS 13.0* or newer. diff --git a/SamplesApp.png b/SamplesApp.png index e5c0e8552..771c15174 100644 Binary files a/SamplesApp.png and b/SamplesApp.png differ diff --git a/arcgis-ios-sdk-samples.xcodeproj/project.pbxproj b/arcgis-ios-sdk-samples.xcodeproj/project.pbxproj index edb6b320d..f6d905810 100644 --- a/arcgis-ios-sdk-samples.xcodeproj/project.pbxproj +++ b/arcgis-ios-sdk-samples.xcodeproj/project.pbxproj @@ -539,9 +539,6 @@ 3EE1799C1DE37199005E0759 /* EditFeaturesOnlineViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3E39F6D01B9790A9000DEC6C /* EditFeaturesOnlineViewController.swift */; }; 3EE1799D1DE37199005E0759 /* OfflineEditingViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3EC39C3E1C9B47C2003F6459 /* OfflineEditingViewController.swift */; }; 3EE692021B03D22500C167B8 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EE692011B03D22500C167B8 /* Category.swift */; }; - 3EE8B9531CA08E54003AA705 /* VectorTileLayer.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EE8B9521CA08E54003AA705 /* VectorTileLayer.storyboard */; }; - 3EE8B9551CA08E71003AA705 /* VectorTileLayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EE8B9541CA08E71003AA705 /* VectorTileLayerViewController.swift */; }; - 3EE8B9591CA0C020003AA705 /* VectorTileLayerViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3EE8B9541CA08E71003AA705 /* VectorTileLayerViewController.swift */; }; 3EEA060D1D21C44000E03774 /* SceneSymbols.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA06021D21C44000E03774 /* SceneSymbols.storyboard */; }; 3EEA060E1D21C44000E03774 /* SceneSymbolsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA06031D21C44000E03774 /* SceneSymbolsViewController.swift */; }; 3EEA060F1D21C44000E03774 /* DisplayScene.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA06051D21C44000E03774 /* DisplayScene.storyboard */; }; @@ -837,6 +834,9 @@ F1124F0A24CFA95F00E672EC /* EditFeaturesWithFeatureLinkedAnnotation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1124F0924CFA95F00E672EC /* EditFeaturesWithFeatureLinkedAnnotation.storyboard */; }; F1124F0C24CFA97000E672EC /* EditFeaturesWithFeatureLinkedAnnotationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1124F0B24CFA97000E672EC /* EditFeaturesWithFeatureLinkedAnnotationViewController.swift */; }; F1151CB5230B1B2000E55682 /* ElevationViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F1D7508E230730360018B812 /* ElevationViewController.swift */; }; + F11897AA2735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11897A92735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift */; }; + F11897AC2735F24600ADC1D4 /* FilterByTimeExtent.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F11897AB2735F24600ADC1D4 /* FilterByTimeExtent.storyboard */; }; + F11897AD2736050B00ADC1D4 /* FilterByTimeExtentViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F11897A92735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift */; }; F11CED6D256C849A002A3F56 /* ShowLabelsOnLayer3DViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F11CED6C256C849A002A3F56 /* ShowLabelsOnLayer3DViewController.swift */; }; F11CED73256C857B002A3F56 /* ShowLabelsOnLayer3D.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F11CED72256C857B002A3F56 /* ShowLabelsOnLayer3D.storyboard */; }; F11CED76256C8BD3002A3F56 /* ShowLabelsOnLayer3DViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = F11CED6C256C849A002A3F56 /* ShowLabelsOnLayer3DViewController.swift */; }; @@ -950,6 +950,7 @@ dstPath = ""; dstSubfolderSpec = 7; files = ( + F11897AD2736050B00ADC1D4 /* FilterByTimeExtentViewController.swift in CopyFiles */, F1C092D7272774530000B132 /* VectorTilePackageViewController.swift in CopyFiles */, F1027F5926F9258E000FA674 /* ExportVectorTilesViewController.swift in CopyFiles */, 008F292A26E0424C00A5BCD3 /* DisplayMapSwiftUIViewController.swift in CopyFiles */, @@ -1145,7 +1146,6 @@ 3E412B411D0B2CC600349155 /* MobileMapViewController.swift in CopyFiles */, 3E6C771D1CCFE5AD00E89873 /* IdentifyLayersViewController.swift in CopyFiles */, 3E54D2361CC69E5E00BB9904 /* GraphicDrawOrderViewController.swift in CopyFiles */, - 3EE8B9591CA0C020003AA705 /* VectorTileLayerViewController.swift in CopyFiles */, 3EC39C461C9B515D003F6459 /* ExportTilesViewController.swift in CopyFiles */, 3EC39C471C9B515D003F6459 /* GenerateGeodatabaseViewController.swift in CopyFiles */, 3EC39C491C9B515D003F6459 /* FeatureLayersViewController.swift in CopyFiles */, @@ -1602,8 +1602,6 @@ 3ED7888F1D26E2F700E5F311 /* LocalTiledLayer.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LocalTiledLayer.storyboard; sourceTree = ""; }; 3EE385511DD4FDE600B13E3C /* srtm.tiff.ovr */ = {isa = PBXFileReference; lastKnownFileType = file; path = srtm.tiff.ovr; sourceTree = ""; }; 3EE692011B03D22500C167B8 /* Category.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; - 3EE8B9521CA08E54003AA705 /* VectorTileLayer.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = VectorTileLayer.storyboard; sourceTree = ""; }; - 3EE8B9541CA08E71003AA705 /* VectorTileLayerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VectorTileLayerViewController.swift; sourceTree = ""; }; 3EEA06021D21C44000E03774 /* SceneSymbols.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SceneSymbols.storyboard; sourceTree = ""; }; 3EEA06031D21C44000E03774 /* SceneSymbolsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneSymbolsViewController.swift; sourceTree = ""; }; 3EEA06051D21C44000E03774 /* DisplayScene.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = DisplayScene.storyboard; sourceTree = ""; }; @@ -1815,6 +1813,8 @@ F1034FAB22D3F6C700B021DA /* MontereyElevation.tpkx */ = {isa = PBXFileReference; lastKnownFileType = file; path = MontereyElevation.tpkx; sourceTree = ""; }; F1124F0924CFA95F00E672EC /* EditFeaturesWithFeatureLinkedAnnotation.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = EditFeaturesWithFeatureLinkedAnnotation.storyboard; sourceTree = ""; }; F1124F0B24CFA97000E672EC /* EditFeaturesWithFeatureLinkedAnnotationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditFeaturesWithFeatureLinkedAnnotationViewController.swift; sourceTree = ""; }; + F11897A92735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterByTimeExtentViewController.swift; sourceTree = ""; }; + F11897AB2735F24600ADC1D4 /* FilterByTimeExtent.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = FilterByTimeExtent.storyboard; sourceTree = ""; }; F11CED6C256C849A002A3F56 /* ShowLabelsOnLayer3DViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowLabelsOnLayer3DViewController.swift; sourceTree = ""; }; F11CED72256C857B002A3F56 /* ShowLabelsOnLayer3D.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ShowLabelsOnLayer3D.storyboard; sourceTree = ""; }; F140E1EA23F35E92008AC44E /* DisplayAnnotationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayAnnotationViewController.swift; sourceTree = ""; }; @@ -3162,6 +3162,7 @@ 3ED027FD1B8E392500ACA70D /* Display information */ = { isa = PBXGroup; children = ( + F11897A82735F15100ADC1D4 /* Filter by time extent */, 000FFFB026CB040B00E3CE7E /* Set up location-driven geotriggers */, 009B5FF525E58E0000BB9A77 /* Create symbol styles from web styles */, F1F651A724984742006DF277 /* Show popup */, @@ -3233,7 +3234,6 @@ 3EA15C721ED89EAE00B1F816 /* Change sublayer renderer */, 3ED028A71B8E3A9800ACA70D /* Change sublayer visibility */, 3E5E09491EF850BA00FF3454 /* Manage sublayers */, - 3EE8B9511CA08E16003AA705 /* ArcGIS vector tiled layer (URL) */, 3E81C1B71D8A0C7400470AA4 /* ArcGIS vector tiled layer (custom style) */, 3E6294081EAFAF4100084105 /* Web tiled layer */, 2196CAF61FD868EA00512693 /* Raster function (service) */, @@ -3598,15 +3598,6 @@ path = Model; sourceTree = ""; }; - 3EE8B9511CA08E16003AA705 /* ArcGIS vector tiled layer (URL) */ = { - isa = PBXGroup; - children = ( - 3EE8B9521CA08E54003AA705 /* VectorTileLayer.storyboard */, - 3EE8B9541CA08E71003AA705 /* VectorTileLayerViewController.swift */, - ); - path = "ArcGIS vector tiled layer (URL)"; - sourceTree = ""; - }; 3EEA06001D21C3E800E03774 /* Scenes */ = { isa = PBXGroup; children = ( @@ -4517,6 +4508,15 @@ path = "Edit features with feature-linked annotation"; sourceTree = ""; }; + F11897A82735F15100ADC1D4 /* Filter by time extent */ = { + isa = PBXGroup; + children = ( + F11897A92735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift */, + F11897AB2735F24600ADC1D4 /* FilterByTimeExtent.storyboard */, + ); + path = "Filter by time extent"; + sourceTree = ""; + }; F11CED6A256C82A8002A3F56 /* Show labels on layer in 3D */ = { isa = PBXGroup; children = ( @@ -5002,7 +5002,6 @@ 3EEA060F1D21C44000E03774 /* DisplayScene.storyboard in Resources */, 3EFDE0F51E36ABB700CBCD92 /* FeatureCollectionLayer.storyboard in Resources */, 3E1E5EED1D9F0B5600F4913C /* srtm.tiff in Resources */, - 3EE8B9531CA08E54003AA705 /* VectorTileLayer.storyboard in Resources */, 3ED029311B8E3AB300ACA70D /* Callout.storyboard in Resources */, 3ED029701B8E3ACD00ACA70D /* EditGeometry.storyboard in Resources */, 4CA6F6CF22C6C671004F0F4F /* mil2525d.stylx in Resources */, @@ -5033,6 +5032,7 @@ 00D4E8DE241AA18E002689DB /* ConvexHull.storyboard in Resources */, 4CCA30CF22399A91009D2AEF /* AddIntegratedMeshLayer.storyboard in Resources */, 3ED75D031ED39EDF009B1F75 /* FindServiceAreaInteractive.storyboard in Resources */, + F11897AC2735F24600ADC1D4 /* FilterByTimeExtent.storyboard in Resources */, 3EABC7C21DB191BC00C161C6 /* Shasta_Elevation.tif in Resources */, 3E1183DF1ECF5A1000180152 /* Pyrenees.csv in Resources */, F1F62C4022E64FFF00EFD599 /* FeatureLayerDictionaryRenderer.storyboard in Resources */, @@ -5423,6 +5423,7 @@ 3E4BF4561C5BD66C00D85919 /* OfflineGeocodeViewController.swift in Sources */, 4C478E4E223F0198009F8CDF /* MapReferenceScaleSettingsViewController.swift in Sources */, 3E0B584E1E36BCCD00951767 /* HotspotSettingsViewController.swift in Sources */, + F11897AA2735F23A00ADC1D4 /* FilterByTimeExtentViewController.swift in Sources */, 3E41DD771B9F5C6C00DA11CC /* DeleteFeaturesViewController.swift in Sources */, C7E9D7C721C0500300E6C47E /* BufferOptionsViewController.swift in Sources */, 1259FB931FD295C90037105E /* WMSLayerUsingURLViewController.swift in Sources */, @@ -5533,7 +5534,6 @@ 3E62940C1EAFAF4100084105 /* WebTiledLayerViewController.swift in Sources */, 0022769026570BA500CC7DB9 /* DisplayOGCAPICollectionViewController.swift in Sources */, 123AC27E20E58CFA0026A7D6 /* GeodesicOperationsViewController.swift in Sources */, - 3EE8B9551CA08E71003AA705 /* VectorTileLayerViewController.swift in Sources */, 009B5FF825E58E0000BB9A77 /* CreateSymbolStylesFromWebStylesViewController.swift in Sources */, 3E39F6D31B9790A9000DEC6C /* EditFeaturesOnlineViewController.swift in Sources */, D9E2E75420EEAC5C001D0AE0 /* FeatureLayerShapefileViewController.swift in Sources */, @@ -5704,7 +5704,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 100.12.0; + MARKETING_VERSION = 100.13.0; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.esri.arcgis-ios-sdk-samples"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -5733,7 +5733,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 100.12.0; + MARKETING_VERSION = 100.13.0; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.esri.arcgis-ios-sdk-samples"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -5840,7 +5840,7 @@ repositoryURL = "https://github.com/Esri/arcgis-runtime-toolkit-ios"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 100.12.0; + minimumVersion = 100.13.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/arcgis-ios-sdk-samples/Augmented reality/Collect data in AR/README.md b/arcgis-ios-sdk-samples/Augmented reality/Collect data in AR/README.md index bc36908ef..f77a8bac4 100644 --- a/arcgis-ios-sdk-samples/Augmented reality/Collect data in AR/README.md +++ b/arcgis-ios-sdk-samples/Augmented reality/Collect data in AR/README.md @@ -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. -**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. +**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. Augmented reality is made possible with the ArcGIS Runtime Toolkit. See [Augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the guide for more information about augmented reality and adding it to your app. See the 'Edit feature attachments' sample for more specific information about the attachment editing workflow. diff --git a/arcgis-ios-sdk-samples/Augmented reality/Display scenes in tabletop AR/README.md b/arcgis-ios-sdk-samples/Augmented reality/Display scenes in tabletop AR/README.md index c74a6eccd..55ee1848b 100644 --- a/arcgis-ios-sdk-samples/Augmented reality/Display scenes in tabletop AR/README.md +++ b/arcgis-ios-sdk-samples/Augmented reality/Display scenes in tabletop AR/README.md @@ -42,9 +42,7 @@ This sample uses the [Philadelphia Mobile Scene Package](https://www.arcgis.com/ This sample requires a device that is compatible with ARKit 1.0 on iOS. -**Tabletop 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. - -This sample uses the ArcGIS Runtime Toolkit. See the section [Enable your app for AR using AR Toolkit](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the iOS Guide to learn about the toolkit and how to add it to your app. +**Tabletop AR** is one of three main patterns for working with geographic information in augmented reality. Augmented reality is made possible with the ArcGIS Runtime Toolkit. See [Augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the guide for more information about augmented reality and adding it to your app. ## Tags diff --git a/arcgis-ios-sdk-samples/Augmented reality/Explore scenes in flyover AR/README.md b/arcgis-ios-sdk-samples/Augmented reality/Explore scenes in flyover AR/README.md index 7be5c50b0..6cba0b357 100644 --- a/arcgis-ios-sdk-samples/Augmented reality/Explore scenes in flyover AR/README.md +++ b/arcgis-ios-sdk-samples/Augmented reality/Explore scenes in flyover AR/README.md @@ -36,9 +36,7 @@ The [world elevation service](https://elevation3d.arcgis.com/arcgis/rest/service This sample requires a device that is compatible with ARKit 1.0 on iOS. -**Flyover AR** is one of three main patterns for working with geographic information in augmented reality. - -This sample uses the ArcGIS Runtime Toolkit. See the section [Enable your app for AR using AR Toolkit](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the iOS Guide to learn about the toolkit and how to add it to your app. +**Flyover AR** is one of three main patterns for working with geographic information in augmented reality. Augmented reality is made possible with the ArcGIS Runtime Toolkit. See [Augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the guide for more information about augmented reality and adding it to your app. ## Tags diff --git a/arcgis-ios-sdk-samples/Augmented reality/Navigate in AR/README.md b/arcgis-ios-sdk-samples/Augmented reality/Navigate in AR/README.md index 66ef3fd01..a9ad1e3b1 100644 --- a/arcgis-ios-sdk-samples/Augmented reality/Navigate in AR/README.md +++ b/arcgis-ios-sdk-samples/Augmented reality/Navigate in AR/README.md @@ -72,7 +72,7 @@ Unlike other scene samples, there's no need for a basemap while navigating, beca A digital elevation model is used to ensure that the displayed route is positioned appropriately relative to the terrain of the route. If you don't want to display the route line floating, you could show the line draped on the surface instead. -**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. +**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. Augmented reality is made possible with the ArcGIS Runtime Toolkit. See [Augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the guide for more information about augmented reality and adding it to your app. Because most navigation scenarios involve traveling beyond the accurate range for ARKit positioning, this sample relies on **continuous location updates** from the location data source. Because the origin camera is constantly being reset by the location data source, the sample doesn't allow the user to pan to calibrate or adjust the altitude with a slider. The location data source doesn't provide a heading, so it isn't overwritten when the location refreshes. diff --git a/arcgis-ios-sdk-samples/Augmented reality/View hidden infrastructure in AR/README.md b/arcgis-ios-sdk-samples/Augmented reality/View hidden infrastructure in AR/README.md index 061df320d..8478a9569 100644 --- a/arcgis-ios-sdk-samples/Augmented reality/View hidden infrastructure in AR/README.md +++ b/arcgis-ios-sdk-samples/Augmented reality/View hidden infrastructure in AR/README.md @@ -55,7 +55,7 @@ Note that unlike other scene samples, a basemap isn't shown most of the time, be You may notice that pipes you draw underground appear to float more than you would expect. That floating is a normal result of the parallax effect that looks unnatural because you're not used to being able to see underground/obscured objects. Compare the behavior of underground pipes with equivalent pipes drawn above the surface - the behavior is the same, but probably feels more natural above ground because you see similar scenes day-to-day (e.g. utility wires). -**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. +**World-scale AR** is one of three main patterns for working with geographic information in augmented reality. Augmented reality is made possible with the ArcGIS Runtime Toolkit. See [Augmented reality](https://developers.arcgis.com/ios/scenes-3d/display-scenes-in-augmented-reality/) in the guide for more information about augmented reality and adding it to your app. This sample uses a combination of two location data source modes: continuous update and one-time update, presented as "roaming" and "local" calibration modes in the app. The error in the position provided by ARKit increases as you move further from the origin, resulting in a poor experience when you move more than a few meters away. The location provided by GPS is more useful over large areas, but not good enough for a convincing AR experience on a small scale. With this sample, you can use "roaming" mode to maintain good enough accuracy for basic context while navigating a large area. When you want to see a more precise visualization, you can switch to "local" (ARKit-only) mode and manually calibrate for best results. diff --git a/arcgis-ios-sdk-samples/Content Display Logic/ContentPList.plist b/arcgis-ios-sdk-samples/Content Display Logic/ContentPList.plist index 3b088fdda..9ab1256db 100644 --- a/arcgis-ios-sdk-samples/Content Display Logic/ContentPList.plist +++ b/arcgis-ios-sdk-samples/Content Display Logic/ContentPList.plist @@ -409,14 +409,6 @@ descriptionText Add, remove, or rearrange existing sublayers in a map image layer. - - displayName - ArcGIS vector tiled layer (URL) - storyboardName - VectorTileLayer - descriptionText - Load an ArcGIS vector tiled layer from a URL. - displayName ArcGIS vector tiled layer (custom style) @@ -1090,6 +1082,14 @@ storyboardName SetUpLocationDrivenGeotriggers + + displayName + Filter by time extent + descriptionText + The time slider provides controls that allow you to visualize temporal data by applying a specific time extent to a map view. + storyboardName + FilterByTimeExtent + diff --git a/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtent.storyboard b/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtent.storyboard new file mode 100644 index 000000000..012da47c6 --- /dev/null +++ b/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtent.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtentViewController.swift b/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtentViewController.swift new file mode 100644 index 000000000..9d5df073c --- /dev/null +++ b/arcgis-ios-sdk-samples/Display information/Filter by time extent/FilterByTimeExtentViewController.swift @@ -0,0 +1,109 @@ +// Copyright 2021 Esri +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import UIKit +import ArcGIS +import ArcGISToolkit + +class FilterByTimeExtentViewController: UIViewController { + /// The map view. + @IBOutlet var mapView: AGSMapView! { + didSet { + let map = makeMap() + mapView.map = map + // Set the map view's viewpoint. + let center = AGSPoint(x: -58.495293, y: 29.979774, spatialReference: .wgs84()) + mapView.setViewpoint(AGSViewpoint(center: center, scale: 1.5e8)) + } + } + + /// The time slider from the ArcGIS toolkit. + let timeSlider: TimeSlider = { + let timeSlider = TimeSlider() + timeSlider.playbackInterval = 0.5 + return timeSlider + }() + + func makeMap() -> AGSMap { + let featureLayer = AGSFeatureLayer( + item: AGSPortalItem( + portal: .arcGISOnline(withLoginRequired: false), + itemID: "49925d814d7e40fb8fa64864ef62d55e" + ), + layerID: 0 + ) + initializeTimeSlider(for: featureLayer) + + let map = AGSMap(basemapStyle: .arcGISTopographic) + map.operationalLayers.add(featureLayer) + return map + } + + /// Initialize the time steps. + func initializeTimeSlider(for featureLayer: AGSFeatureLayer) { + // The default date and time for the starting and ending thumb. + let currentTimeExtent: AGSTimeExtent = { + // The date formatter. + let formatter = DateFormatter() + formatter.dateFormat = "yyyy/MM/dd HH:mm" + return AGSTimeExtent( + startTime: formatter.date(from: "2005/10/01 05:00")!, + endTime: formatter.date(from: "2005/10/31 05:00")! + ) + }() + featureLayer.load { [weak self] error in + guard error == nil, let fullTimeExtent = featureLayer.fullTimeExtent else { return } + self?.timeSlider.initializeTimeSteps(timeStepCount: 60, fullExtent: fullTimeExtent) { _ in + // Set the current time extent. + self?.timeSlider.currentExtent = currentTimeExtent + } + } + } + + /// Configure the time slider's attributes and position. + func setupTimeSlider() { + // Configure time slider. + timeSlider.labelMode = .thumbs + timeSlider.addTarget(self, action: #selector(timeSliderValueChanged(timeSlider:)), for: .valueChanged) + // Add the time slider to the view. + view.addSubview(timeSlider) + + // Add constraints to position the slider. + timeSlider.translatesAutoresizingMaskIntoConstraints = false + // Assign the constraints. + let constraints = [ + timeSlider.leadingAnchor.constraint(equalToSystemSpacingAfter: view.safeAreaLayoutGuide.leadingAnchor, multiplier: 1), + view.safeAreaLayoutGuide.trailingAnchor.constraint(equalToSystemSpacingAfter: timeSlider.trailingAnchor, multiplier: 1), + mapView.attributionTopAnchor.constraint(equalToSystemSpacingBelow: timeSlider.bottomAnchor, multiplier: 1) + ] + // Activate the constraints. + NSLayoutConstraint.activate(constraints) + } + + @objc + func timeSliderValueChanged(timeSlider: TimeSlider) { + if mapView.timeExtent != timeSlider.currentExtent { + mapView.timeExtent = timeSlider.currentExtent + } + } + + // MARK: UIViewController + + override func viewDidLoad() { + super.viewDidLoad() + setupTimeSlider() + // Add the source code button item to the right of navigation bar. + (navigationItem.rightBarButtonItem as? SourceCodeBarButtonItem)?.filenames = ["FilterByTimeExtentViewController"] + } +} diff --git a/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.md b/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.md new file mode 100644 index 000000000..c9a8d3dc9 --- /dev/null +++ b/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.md @@ -0,0 +1,35 @@ +# Filter by time extent + +The time slider provides controls that allow you to visualize temporal data by applying a specific time extent to a map view. + +![Filter by time extent](filter-time-extent.png) + +## Use case + +When viewing feature layers that contain a large amount of data with timestamps, you may want to filter the data to only show data relevant to a specific time range. This can help visualize changes in the data over time and aids in making better interpretations and predictions of future trends. + +## How to use the sample + +Use the slider at the bottom of the map to customize the date range for which you want to view the data. The date for the hurricanes sample data ranges from September 1st, 2005 to December 31st, 2005. Once the start and end dates have been selected, the map view will update to only show the relevant data that falls in the time extent selected. Use the play button to step through the data one day at a time. Use the previous and next buttons to go back and forth in 2 day increments as demonstrated below. + +## How it works + +1. Create an `AGSMapView` with an `AGSMap`. +2. Create a feature layer by creating an `AGSPortalItem` and specifying the layer. +3. Add the feature layer that includes time-enabled data to the map's array of operational layers. +4. Create a `TimeSlider` from the ArcGIS Runtime Toolkit to allow users to show data only from the given date range. This sets up all necessary calls to visualize and step through the temporal data. + +## Relevant API + +* AGSFeatureLayer +* AGSMap +* AGSMapView +* AGSServiceFeatureTable + +## Additional information + +This sample uses [Atlantic hurricane data](https://www.arcgis.com/home/item.html?id=49925d814d7e40fb8fa64864ef62d55e) from the National Hurricane Center (NOAA / National Weather Service) and the `TimeSlider` toolkit component which requires the [toolkit](https://github.com/Esri/arcgis-runtime-toolkit-ios) to be cloned and set up locally. For information about setting up the toolkit, see the repository's root README.md [here](https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/master/README.md). + +## Tags + +animate, data, filter, time, time extent, time frame, toolkit diff --git a/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.metadata.json b/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.metadata.json new file mode 100644 index 000000000..77c97e15d --- /dev/null +++ b/arcgis-ios-sdk-samples/Display information/Filter by time extent/README.metadata.json @@ -0,0 +1,32 @@ +{ + "category": "Display information", + "description": "The time slider provides controls that allow you to visualize temporal data by applying a specific time extent to a map view.", + "ignore": false, + "images": [ + "filter-time-extent.png" + ], + "keywords": [ + "animate", + "data", + "filter", + "time", + "time extent", + "time frame", + "toolkit", + "AGSFeatureLayer", + "AGSMap", + "AGSMapView", + "AGSServiceFeatureTable" + ], + "redirect_from": [], + "relevant_apis": [ + "AGSFeatureLayer", + "AGSMap", + "AGSMapView", + "AGSServiceFeatureTable" + ], + "snippets": [ + "FilterByTimeExtentViewController.swift" + ], + "title": "Filter by time extent" +} diff --git a/arcgis-ios-sdk-samples/Display information/Filter by time extent/filter-time-extent.png b/arcgis-ios-sdk-samples/Display information/Filter by time extent/filter-time-extent.png new file mode 100644 index 000000000..bb9803b3d Binary files /dev/null and b/arcgis-ios-sdk-samples/Display information/Filter by time extent/filter-time-extent.png differ diff --git a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/NearestVertexViewController.swift b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/NearestVertexViewController.swift index 497b4a85b..45d0111bc 100644 --- a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/NearestVertexViewController.swift +++ b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/NearestVertexViewController.swift @@ -16,22 +16,47 @@ import UIKit import ArcGIS class NearestVertexViewController: UIViewController { - /// The graphics and symbology for the tapped point, the nearest vertex and the nearest coordinate. - let tappedLocationSymbol = AGSSimpleMarkerSymbol(style: .X, color: .orange, size: 15) - let nearestCoordinateSymbol = AGSSimpleMarkerSymbol(style: .diamond, color: .red, size: 10) - let nearestVertexSymbol = AGSSimpleMarkerSymbol(style: .circle, color: .blue, size: 15) + // MARK: Properties - /// The symbology for the example polygon area. - let polygonFillSymbol = AGSSimpleFillSymbol( - style: .forwardDiagonal, - color: .green, - outline: AGSSimpleLineSymbol(style: .solid, color: .green, width: 2) - ) + /// The map view managed by the view controller. + @IBOutlet var mapView: AGSMapView! { + didSet { + mapView.map = makeMap() + mapView.graphicsOverlays.add(makeGraphicsOverlay()) + mapView.setViewpointCenter(polygon.extent.center, scale: 8e6) + mapView.touchDelegate = self + mapView.callout.isAccessoryButtonHidden = true + } + } - /// The graphics overlay for the polygon and points. - let graphicsOverlay = AGSGraphicsOverlay() + /// The example polygon geometry near San Bernardino County, California. + let polygon: AGSPolygon = { + let polygonBuilder = AGSPolygonBuilder(spatialReference: .statePlaneCaliforniaZone5) + polygonBuilder.addPointWith(x: 6627416.41469281, y: 1804532.53233782) + polygonBuilder.addPointWith(x: 6669147.89779046, y: 2479145.16609522) + polygonBuilder.addPointWith(x: 7265673.02678292, y: 2484254.50442408) + polygonBuilder.addPointWith(x: 7676192.55880379, y: 2001458.66365744) + polygonBuilder.addPointWith(x: 7175695.94143837, y: 1840722.34474458) + return polygonBuilder.toGeometry() + }() + + /// The graphic for the tapped location point. + let tappedLocationGraphic: AGSGraphic = { + let symbol = AGSSimpleMarkerSymbol(style: .X, color: .orange, size: 15) + return AGSGraphic(geometry: nil, symbol: symbol) + }() + /// The graphic for the nearest coordinate point. + let nearestCoordinateGraphic: AGSGraphic = { + let symbol = AGSSimpleMarkerSymbol(style: .diamond, color: .red, size: 10) + return AGSGraphic(geometry: nil, symbol: symbol) + }() + /// The graphic for the nearest vertex point. + let nearestVertexGraphic: AGSGraphic = { + let symbol = AGSSimpleMarkerSymbol(style: .circle, color: .blue, size: 15) + return AGSGraphic(geometry: nil, symbol: symbol) + }() - /// A formatter to convert units for distance. + /// A distance formatter to format distance measurements and units. let distanceFormatter: MeasurementFormatter = { let formatter = MeasurementFormatter() formatter.numberFormatter.maximumFractionDigits = 1 @@ -39,108 +64,97 @@ class NearestVertexViewController: UIViewController { return formatter }() - /// The point collection that defines the polygon. - let createdPolygon: AGSPolygon = { - let polygonBuilder = AGSPolygonBuilder(spatialReference: .webMercator()) - polygonBuilder.addPointWith(x: -5991501.677830, y: 5599295.131468) - polygonBuilder.addPointWith(x: -6928550.398185, y: 2087936.739807) - polygonBuilder.addPointWith(x: -3149463.800709, y: 1840803.011362) - polygonBuilder.addPointWith(x: -1563689.043184, y: 3714900.452072) - polygonBuilder.addPointWith(x: -3180355.516764, y: 5619889.608838) - return polygonBuilder.toGeometry() - }() - - /// The graphic for the polygon, tapped point, nearest coordinate point and nearest vertex point. - lazy var polygonGraphic = AGSGraphic(geometry: createdPolygon, symbol: polygonFillSymbol) - lazy var tappedLocationGraphic = AGSGraphic(geometry: nil, symbol: tappedLocationSymbol) - lazy var nearestCoordinateGraphic = AGSGraphic(geometry: nil, symbol: nearestCoordinateSymbol) - lazy var nearestVertexGraphic = AGSGraphic(geometry: nil, symbol: nearestVertexSymbol) + // MARK: Methods - /// The map view managed by the view controller. - @IBOutlet weak var mapView: AGSMapView! { - didSet { - mapView.map = makeMap() - mapView.graphicsOverlays.add(graphicsOverlay) - mapView.setViewpointCenter( - AGSPoint( - x: -4487263.495911, - y: 3699176.480377, - spatialReference: .webMercator() - ), - scale: 1e8 - ) - mapView.touchDelegate = self - } - } - - /// Creates a map. - /// + /// Create a map. /// - Returns: A new `AGSMap` object. func makeMap() -> AGSMap { - let map = AGSMap(basemapStyle: .arcGISTopographic) + let map = AGSMap(spatialReference: .statePlaneCaliforniaZone5) + let usStatesGeneralizedLayer = AGSFeatureLayer( + item: AGSPortalItem( + portal: .arcGISOnline(withLoginRequired: false), + itemID: "99fd67933e754a1181cc755146be21ca"), + layerID: 0 + ) + map.basemap.baseLayers.add(usStatesGeneralizedLayer) return map } - /// Adds the graphics to the graphics overlay. - func addGraphicsToOverlay() { + func makeGraphicsOverlay() -> AGSGraphicsOverlay { + let polygonFillSymbol = AGSSimpleFillSymbol( + style: .forwardDiagonal, + color: .green, + outline: AGSSimpleLineSymbol(style: .solid, color: .green, width: 2) + ) + // The graphic for the polygon. + let polygonGraphic = AGSGraphic(geometry: polygon, symbol: polygonFillSymbol) + + let graphicsOverlay = AGSGraphicsOverlay() graphicsOverlay.graphics.addObjects(from: [ polygonGraphic, nearestCoordinateGraphic, tappedLocationGraphic, nearestVertexGraphic ]) + return graphicsOverlay } // MARK: UIViewController override func viewDidLoad() { super.viewDidLoad() - addGraphicsToOverlay() // Add the source code button item to the right of navigation bar. - (self.navigationItem.rightBarButtonItem as? SourceCodeBarButtonItem)?.filenames = ["NearestVertexViewController"] + (navigationItem.rightBarButtonItem as? SourceCodeBarButtonItem)?.filenames = ["NearestVertexViewController"] } } +private extension AGSSpatialReference { + /// California zone 5 (ftUS) state plane coordinate system. + static let statePlaneCaliforniaZone5 = AGSSpatialReference(wkid: 2229)! +} + // MARK: - AGSGeoViewTouchDelegate extension NearestVertexViewController: AGSGeoViewTouchDelegate { + func showCallout(at mapPoint: AGSPoint) { + // Get nearest vertex and nearest coordinate results. + let nearestVertexResult = AGSGeometryEngine.nearestVertex(in: polygon, to: mapPoint)! + let nearestCoordinateResult = AGSGeometryEngine.nearestCoordinate(in: polygon, to: mapPoint)! + + // Set the geometries for the tapped, nearest coordinate and + // nearest vertex point graphics. + nearestVertexGraphic.geometry = nearestVertexResult.point + nearestCoordinateGraphic.geometry = nearestCoordinateResult.point + + // Get the distance to the nearest vertex in the polygon. + let distanceVertex = Measurement( + value: nearestVertexResult.distance, + unit: UnitLength.feet + ) + // Get the distance to the nearest coordinate in the polygon. + let distanceCoordinate = Measurement( + value: nearestCoordinateResult.distance, + unit: UnitLength.feet + ) + + // Display the results in a callout at tapped location. + mapView.callout.title = "Proximity result" + mapView.callout.detail = String( + format: "Vertex dist: %@; Point dist: %@", + distanceFormatter.string(from: distanceVertex), + distanceFormatter.string(from: distanceCoordinate) + ) + mapView.callout.show(for: tappedLocationGraphic, tapLocation: mapPoint, animated: true) + } + func geoView(_ geoView: AGSGeoView, didTapAtScreenPoint screenPoint: CGPoint, mapPoint: AGSPoint) { if mapView.callout.isHidden { - // If the callout is not shown, show the callout with the coordinates of the normalized map point. - if let normalizedPoint = AGSGeometryEngine.normalizeCentralMeridian(of: mapPoint) as? AGSPoint, - let nearestVertexResult = AGSGeometryEngine.nearestVertex(in: polygonGraphic.geometry!, to: normalizedPoint), - let nearestCoordinateResult = AGSGeometryEngine.nearestCoordinate(in: polygonGraphic.geometry!, to: normalizedPoint) { - // Set the geometry for the tapped point, nearest coordinate point and nearest vertex point. - tappedLocationGraphic.geometry = normalizedPoint - nearestVertexGraphic.geometry = nearestVertexResult.point - nearestCoordinateGraphic.geometry = nearestCoordinateResult.point - // Get the distance to the nearest vertex in the polygon. - let distanceVertex = Measurement( - value: nearestVertexResult.distance, - unit: UnitLength.meters - ) - // Get the distance to the nearest coordinate in the polygon. - let distanceCoordinate = Measurement( - value: nearestCoordinateResult.distance, - unit: UnitLength.meters - ) - // Display the results on a callout of the tapped point. - mapView.callout.title = "Proximity result" - mapView.callout.detail = String( - format: "Vertex dist: %@; Point dist: %@", - distanceFormatter.string(from: distanceVertex), - distanceFormatter.string(from: distanceCoordinate) - ) - mapView.callout.isAccessoryButtonHidden = true - mapView.callout.show( - at: normalizedPoint, - screenOffset: .zero, - rotateOffsetWithMap: false, - animated: true - ) - } + // If the callout is hidden, show it at the normalized map point. + guard let normalizedMapPoint = AGSGeometryEngine.normalizeCentralMeridian(of: mapPoint) as? AGSPoint else { return } + tappedLocationGraphic.geometry = normalizedMapPoint + showCallout(at: normalizedMapPoint) } else { - // Dismiss the callout and reset geometry for all simple marker graphics. + // Dismiss the callout and reset geometries. mapView.callout.dismiss() tappedLocationGraphic.geometry = nil nearestVertexGraphic.geometry = nil diff --git a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.md b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.md index e571f297c..48f67f4f8 100644 --- a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.md +++ b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.md @@ -23,8 +23,14 @@ Tap anywhere on the map. An orange cross will show at that location. A blue circ ## Relevant API * AGSGeometry -* AGSGeometryEngine * AGSProximityResult +* class AGSGeometryEngine.nearestCoordinate(in:to:) +* class AGSGeometryEngine.nearestVertex(in:to:) +* class AGSGeometryEngine.normalizeCentralMeridian(of:) + +## Additional information + +The value of `AGSProximityResult.distance` is planar (Euclidean) distance. Planar distances are only accurate for geometries that have a defined projected coordinate system, which maintain the desired level of accuracy. The example polygon in this sample is defined in California State Plane Coordinate System - Zone 5 (WKID 2229), which maintains accuracy near Southern California. Accuracy declines outside the state plane zone. ## Tags diff --git a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.metadata.json b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.metadata.json index d041df379..102e819b2 100644 --- a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.metadata.json +++ b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/README.metadata.json @@ -13,14 +13,18 @@ "proximity", "vertex", "AGSGeometry", - "AGSGeometryEngine", - "AGSProximityResult" + "AGSProximityResult", + "class AGSGeometryEngine.nearestCoordinate(in:to:)", + "class AGSGeometryEngine.nearestVertex(in:to:)", + "class AGSGeometryEngine.normalizeCentralMeridian(of:)" ], "redirect_from": [], "relevant_apis": [ "AGSGeometry", - "AGSGeometryEngine", - "AGSProximityResult" + "AGSProximityResult", + "class AGSGeometryEngine.nearestCoordinate(in:to:)", + "class AGSGeometryEngine.nearestVertex(in:to:)", + "class AGSGeometryEngine.normalizeCentralMeridian(of:)" ], "snippets": [ "NearestVertexViewController.swift" diff --git a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/nearest-vertex.png b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/nearest-vertex.png index de5bccc25..ee2a8ca73 100644 Binary files a/arcgis-ios-sdk-samples/Geometry/Nearest vertex/nearest-vertex.png and b/arcgis-ios-sdk-samples/Geometry/Nearest vertex/nearest-vertex.png differ diff --git a/arcgis-ios-sdk-samples/Info.plist b/arcgis-ios-sdk-samples/Info.plist index 6438772f9..b491da806 100644 --- a/arcgis-ios-sdk-samples/Info.plist +++ b/arcgis-ios-sdk-samples/Info.plist @@ -53,13 +53,6 @@ NSExceptionDomains - buienradar.nl - - NSIncludesSubdomains - - NSThirdPartyExceptionAllowsInsecureHTTPLoads - - noaa.gov NSIncludesSubdomains @@ -74,13 +67,6 @@ NSThirdPartyExceptionAllowsInsecureHTTPLoads - vlieghinder.nl - - NSIncludesSubdomains - - NSThirdPartyExceptionAllowsInsecureHTTPLoads - - NSCameraUsageDescription diff --git a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.md b/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.md deleted file mode 100644 index 33e53851b..000000000 --- a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# ArcGIS vector tiled layer (URL) - -Load an ArcGIS vector tiled layer from a URL. - -![ArcGIS vector tiled layer (URL) sample](vector-tiled-layer-url.png) - -## Use case - -Vector tile basemaps can be created in ArcGIS Pro and published as offline packages or online services. `ArcGISVectorTiledLayer` has many advantages over traditional raster based basemaps (`ArcGISTiledLayer`), including smooth scaling between different screen DPIs, smaller package sizes, and the ability to rotate symbols and labels dynamically. - -## How to use the sample - -Use the bottom button to load different vector tile basemaps. - -## How it works - -1. Create an `AGSArcGISVectorTiledLayer` with an ArcGIS Online service URL. -2. Add the layer as an `AGSBasemap` to the `AGSMap`. - -## Relevant API - -* AGSArcGISVectorTiledLayer -* AGSBasemap - -## Tags - -tiles, vector, vector basemap, vector tiled layer, vector tiles diff --git a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.metadata.json b/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.metadata.json deleted file mode 100644 index dc2ba247a..000000000 --- a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/README.metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "category": "Layers", - "description": "Load an ArcGIS vector tiled layer from a URL.", - "ignore": false, - "images": [ - "vector-tiled-layer-url.png" - ], - "keywords": [ - "tiles", - "vector", - "vector basemap", - "vector tiled layer", - "vector tiles", - "AGSArcGISVectorTiledLayer", - "AGSBasemap" - ], - "redirect_from": [ - "/ios/latest/swift/sample-code/arcgis-vector-tile-layer-url-.htm" - ], - "relevant_apis": [ - "AGSArcGISVectorTiledLayer", - "AGSBasemap" - ], - "snippets": [ - "VectorTileLayerViewController.swift" - ], - "title": "ArcGIS vector tiled layer (URL)" -} diff --git a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayer.storyboard b/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayer.storyboard deleted file mode 100644 index 607cf7c1d..000000000 --- a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayer.storyboard +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayerViewController.swift b/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayerViewController.swift deleted file mode 100644 index 86582cd19..000000000 --- a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/VectorTileLayerViewController.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// Copyright 2016 Esri. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import UIKit -import ArcGIS - -class VectorTileLayerViewController: UIViewController { - @IBOutlet var mapView: AGSMapView! - - /// The model array containing the layer options. - private let vectorTiledLayerItems: [(label: String, itemID: String)] = [ - ("Mid-Century", "7675d44bb1e4428aa2c30a9b68f97822"), - ("Colored Pencil", "4cf7e1fb9f254dcda9c8fbadb15cf0f8"), - ("Newspaper", "dfb04de5f3144a80bc3f9f336228d24a"), - ("Nova", "75f4dfdff19e445395653121a95a85db"), - ("Night", "86f556a2d1fd468181855a35e344567f") - ] - - override func viewDidLoad() { - super.viewDidLoad() - - // add the source code button item to the right of navigation bar - (navigationItem.rightBarButtonItem as! SourceCodeBarButtonItem).filenames = [ - "VectorTileLayerViewController", - "OptionsTableViewController" - ] - - /// The URL of the initial layer to display. - let url = makeArcGISURL(itemID: vectorTiledLayerItems.first!.itemID) - - // create a vector tiled layer - let vectorTileLayer = AGSArcGISVectorTiledLayer(url: url) - // create a map and set the vector tiled layer as the basemap - let map = AGSMap(basemap: AGSBasemap(baseLayer: vectorTileLayer)) - - // assign the map to the map view - mapView.map = map - - // center on Miami, FL - mapView.setViewpointCenter(AGSPoint(x: -80.18, y: 25.778135, spatialReference: .wgs84()), scale: 150000) - } - - private func makeArcGISURL(itemID: String) -> URL { - var urlComponents = URLComponents(string: "https://www.arcgis.com/home/item.html")! - urlComponents.queryItems = [URLQueryItem(name: "id", value: itemID)] - return urlComponents.url! - } - - @IBAction func changeVectorTiledLayer(_ sender: UIBarButtonItem) { - guard let layer = mapView.map?.basemap.baseLayers.firstObject as? AGSArcGISVectorTiledLayer, - let selectedItemID = layer.item?.itemID, - // get the index of the layer currently shown in the map - let selectedIndex = vectorTiledLayerItems.firstIndex(where: { $0.itemID == selectedItemID }) else { - return - } - - /// The labels for the layer options - let layerLabels = vectorTiledLayerItems.map { $0.label } - - /// A view controller allowing the user to select the layer to show. - let controller = OptionsTableViewController(labels: layerLabels, selectedIndex: selectedIndex) { [weak self] (newIndex) in - guard let self = self else { - return - } - - // get the layer ID for the index - let itemID = self.vectorTiledLayerItems[newIndex].itemID - // get the url for the layer ID - let url = self.makeArcGISURL(itemID: itemID) - // create the new vector tiled layer using the url - let vectorTileLayer = AGSArcGISVectorTiledLayer(url: url) - // change the basemap to the new layer - self.mapView.map?.basemap = AGSBasemap(baseLayer: vectorTileLayer) - } - - // configure the options controller as a popover - controller.modalPresentationStyle = .popover - controller.presentationController?.delegate = self - controller.preferredContentSize = CGSize(width: 300, height: 220) - controller.popoverPresentationController?.barButtonItem = sender - controller.popoverPresentationController?.passthroughViews?.append(mapView) - - // show the popover - present(controller, animated: true) - } -} - -extension VectorTileLayerViewController: UIAdaptivePresentationControllerDelegate { - func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle { - // show presented controller as popovers even on small displays - return .none - } -} diff --git a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/vector-tiled-layer-url.png b/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/vector-tiled-layer-url.png deleted file mode 100644 index b516319d7..000000000 Binary files a/arcgis-ios-sdk-samples/Layers/ArcGIS vector tiled layer (URL)/vector-tiled-layer-url.png and /dev/null differ diff --git a/arcgis-ios-sdk-samples/Layers/Play a KML Tour/README.md b/arcgis-ios-sdk-samples/Layers/Play a KML Tour/README.md index 0d69514de..fad47d6f2 100644 --- a/arcgis-ios-sdk-samples/Layers/Play a KML Tour/README.md +++ b/arcgis-ios-sdk-samples/Layers/Play a KML Tour/README.md @@ -35,7 +35,7 @@ This sample uses the [Esri_tour.kmz](https://arcgisruntime.maps.arcgis.com/home/ ## About the data -This sample uses a custom tour created by a member of the ArcGIS Runtime SDK samples team. When you play the tour, you'll see a narrated journey through some of Esri's offices. +This sample uses a custom tour created by a member of the ArcGIS Runtime API samples team. When you play the tour, you'll see a narrated journey through some of Esri's offices. ## Additional information diff --git a/podfile b/podfile index 3a22fcdfc..2e52fb58b 100644 --- a/podfile +++ b/podfile @@ -1,5 +1,5 @@ platform :ios, '13.0' target 'ArcGIS Runtime SDK Samples' do use_frameworks! - pod 'ArcGIS-Runtime-Toolkit-iOS', '~> 100.12' + pod 'ArcGIS-Runtime-Toolkit-iOS', '~> 100.13' end \ No newline at end of file