Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing iOS & Mac apps with ArcGIS Runtime SDK

Similar presentations


Presentation on theme: "Developing iOS & Mac apps with ArcGIS Runtime SDK"— Presentation transcript:

1 Developing iOS & Mac apps with ArcGIS Runtime SDK
Suganya Baskaran, Divesh Goyal

2 Topics Overview of Runtime Quick intro to SDK
Common functionality & patterns Displaying map content Searching for content Performing analysis Editing geographic data Offline capabilities Security Licensing Q/A

3

4

5 Runtime platforms .NET Desktop Mobile Embedded OS X Desktop Client
Windows Store QT .NET iOS JavaSE Mobile Android Embedded Windows Mobile Windows Phone

6 ArcGIS Runtime SDK for iOS & OS X
Build native applications using Objective-C & Swift OS X (Mountain Lion, Mavericks, Yosemite) iOS (6.x, 7.x, 8.x)

7 Before you begin… Mac Xcode 5.x or 6.x
OSX 10.9, (Mavericks, Yosemite) Xcode 5.x or 6.x Apple’s iOS & OSX SDKs iOS Simulator Instruments ArcGIS Runtime SDK for iOS & OSX Latest release : Version

8 SDK Resources developers.arcgis.com

9 Displaying map content
Common Workflows

10 Displaying a Map UI Component : AGSMapView Responds to gestures
Touch Trackpad Mouse Keyboard In-built Magnifier & Callout Displays device location Auto pan for location updates

11 A Map is composed of Layers
Operational data Dynamic layers Feature layers Temporary app data Graphics layers Basemap Tiled layer

12 Sources of map data Tiled layers – subclasses of AGSTiledLayer
ArcGIS Map Services (Cached), OGC WMTS, Bing, OpenStreetMap Fetch pre-cached tiles from services and assemble on screen Extremely fast. Good for static data. Dynamic layers - subclasses of AGSDynamicLayer ArcGIS Map Services, ArcGIS Image Services, OGC WMS Generate map images from service on-demand. Good for changing data, or customizing map display Feature layers – AGSFeatureLayer ArcGIS Feature Services Download raw features and draw natively on screen Good for editing

13 Layer pattern Construct & Connect ArcGIS On Premise Online
URL to web service Add to mapview //Construct layer let tiledLayer = AGSTiledMapServiceLayer(URL: serviceUrl) //Add to map view self.mapView.addMapLayer(tiledLayer, withName:"World Street Map")

14 Web Maps Author on ArcGIS Online or on-premise ArcGIS Portal AGSWebMap
JSON Web Maps Author on ArcGIS Online or on-premise ArcGIS Portal Predefined list of layers Initial map configuration Extent, scale range, symbology etc AGSWebMap Creates appropriate layer objects when opened into mapview //Create webmap self.webmap = AGSWebMap(itemId: "b31153c71c6c429a8b24c1751a50d3ad", credential:nil) //Open into mapview self.webmap.openIntoMapView(self.mapView)

15 Displaying details about geographic features
Popups make it easy to view Attributes Graphs, Charts Attachments Picture Video PDF/MS-Office attachments

16 Demo Add a map to an app

17 Types of location apps GasBuddy Reminders Map centric No map

18 Types of location apps Redfin Yelp Map as context Map centric No map

19 Companion apps, working together
For various form-factors

20 Searching for content Common Workflows

21 Searching for Content Search for Places Search for Places
Search for Features ArcGIS Online Portal Search Portal /

22 Searching ArcGIS Org or Portal
Server Online Content and Services Portal ArcGIS Org Searching ArcGIS Org or Portal Webmap Feature Layer Tile Layer Map Image Layer Create portal Searching for content

23 Searching ArcGIS Org or Portal
Set delegate Delegation ? Adopt protocol Searching for content

24 Delegate acts on behalf of Delegating Object
Delegation Delegate acts on behalf of Delegating Object Portal Eg. Portal Loaded Or Found Map etc. 1. Portal Event Portal Delegate (AnyClass) 2. User Interaction 4 Respond To Class 3. State Change Set a delegate object Adopt the protocol Implement methods of the protocol Searching for content

25 Searching ArcGIS Org or Portal
Create Query Parameters Predefined Queries Custom Queries Searching for content

26 Searching ArcGIS Org or Portal
Execute Queries Delegate Methods Query Results – Async Callback Searching for content

27 Portal Demo

28 Search for Places Search Portal / ArcGIS Online
Searching for content

29 Search for Places - Geocode Service - Geocoding – Address to Locations
- Geocoding – Address to Locations - Reverse Geocoding – Locations to Addresses Create locator Set delegate Searching for content

30 Search for Places Geocoding Set Parameters Execute
Searching for content

31 Delegate Methods for Results
Search for Places Delegate Methods for Results Handle Geocoding Results Delegation pattern Address Candidate objects Location Attributes Display in Map Searching your content

32 Geocoding Demo

33 Search for Places Search for Features Search Portal / ArcGIS Online
Searching for content

34 In a single layer At a map location
Search for Features In a single layer Query Task At a map location Identify Task Searching for content

35 Search for Features Query Task Single layer or table
ArcGIS Map Service, Feature Service Vector Query for Features, ObjectIDs or just count Create a Query task Searching for content

36 Attribute Query Spatial Query Temporal Query Related Features Order By
Search for Features Types of Queries - Attributes of the layer - where, outFields etc Attribute Query - Input geometry - Intersects, Within, Touches etc Spatial Query Statistics - Count, Std Dev etc - Group By Temporal Query - Input time extent Order By - Attributes - Asc or Desc Related Features - Relationship query Searching for content

37 Search for Features My favorite Query Searching for content

38 Search for Features My actual Query  Searching for content

39 Search for Features Identify Task Multiple layers ArcGIS Map Service
Create Identify Task Searching for content

40 Identify Task Parameters
Search for Features Identify Task Parameters layerIDs geometry spatialReference layerOption returnGeometry mapEnvelope size tolerance Execute Identify Task Searching for content

41 Graphic In-memory object Features from - Feature service
- Task results AGSGraphic - Geometry - Attributes - Symbol Searching your content

42 Query Task Demo

43 Predefined/Custom queries
Search for Places Search for Features ArcGIS Online Portal Search Portal / Find featured maps Find Items/Groups Predefined/Custom queries Geocoding Query Task Identify Task Graphic Searching for content

44 Performing Analysis Common Workflows

45 Analysis on transportation networks
Plan routes - AGSRouteTask Point to Point, or multi-point Optimize based on distance or travel time Reorder stops for best sequence Time windows, Barriers & Restrictions Compute service areas - AGSServiceAreaTask Find closest facilities – AGSClosestFacilityTask ArcGIS Online World Route service 100+ Countries. Live & Historical Traffic data Requires subscription. Consumes credits On-premise Route services for custom data

46 Spatial Analysis ArcGIS Online Spatial Analysis service
AGSGeoprocessor Invoke geoprocessing services ArcGIS Online Spatial Analysis service Summarize Data (Aggregate points, etc) Analyze Patterns (Watershed, Viewshed,etc) Use Proxmity (Density, HotSpot, Interpolate, etc) On-premise Geoprocessing services Custom geoprocessing tools & models

47 Geometric Operations AGSGeometryEngine Native, high performance engine
Relationship tests Touches, Intersects, Within, Contains, Overlaps, Crosses Set operations Union, Difference, Intersect Topological operations Cut, Clip, Simplify, Densify, Buffer, ConvexHull Measure areas and distance Project between spatial references let engine = AGSGeometryEngine.defaultGeometryEngine() Boolean crosses = engine.crosses(geometry:g1 crossesGeometry:g2)

48 Recap: Task Pattern Construct & Connect. Assign a delegate
ArcGIS Online On Premise Construct & Connect. URL to web service Assign a delegate Set up input parameters. Invoke. Process results in the delegate.

49 Demo Analysis Samples

50 Reuse code between iOS & Mac
M-V-C architecture enables code sharing M : Model V : View C : Controller Model classes & business logic can be reused Based on Apple’s Foundation framework, common to iOS & Mac View and View-Controller are platform specific Based on Apple’s UIKit on iOS, AppKit on Mac

51 Editing geographic data
Common Workflows

52 Editing Feature Layer Feature Layer in webmap
What layer is required for Editing? Portal Developers Site ArcGIS Online/Org ArcGIS Server What are possible Feature Layer sources? Related Records Time Aware Non-Spatial Tables Spatial Features What types of features can be edited? Online Offline What are available Editing modes?

53 Sketch Layer Create, Edit Geometries Interactive No Code almost! Geometry used for Feature Layer Editing

54 Sketch Layer 1. Create a sketch layer 2. Assign it a mutable geometry
How does it Work? 1. Create a sketch layer 2. Assign it a mutable geometry 3. Set delegate to receive touch events Secret Step 4: Reset touch delegate after Editing!

55 Sketch Layer Programmatic Sketching Undo Redo Notifications

56 Popups Display Feature Information Edit Attributes & Attachments Edit Geometry through Sketch Layer

57 AGSPopupsContainerViewController
Web Map Feature Layer Configure Popups in webmap Create Popup from a feature Fetch Popups Get list of popups Popups Container AGSPopupsContainerViewController

58 Customize Popups Delegate Methods
Start Edit Finish Edit Done View Cancel Delete and much more… Attributes Tool Bar Buttons Presentation

59 Editing Popups handle all this! Editor Tracking
- User & Timestamp of Create/Update Ownership Based Access Control - Limit editing depending on user Popups handle all this! Capabilities - Limit editing for all users Data Validation - Non null, Coded and Range Values etc

60 Editing Apply Edits To Server Batch Updates Attachment Manager
- Coarse grained methods

61 Editing Demo

62 Offline Capabilities Common Workflows

63 Patterns for generating offline content
Desktop Pattern Package data through ArcMap Side load onto device, or bundle in application Services Pattern Extract data from services on-the-fly Tile package - AGSDownloadTileCacheTask Geodatabase - AGSGDBSyncTask Tile package Geodatabase Network Dataset Locator

64 Offline Mapping View & Interact with maps
Display Tile package - AGSLocalTileLayer Display Geodatabase - AGSFeatureTableLayer Query using SQL or spatial criteria Edit existing or create new features Layer pattern remains the same Construct & Connect Path to local data Add to mapview Tile package Geodatabase

65 Offline Editing Edits persisted in the geodatabase on the device
Changes can be synchronized with the service Upload only, Download only, or Bidirectional Author Map View Query Analyze Edit Synchronize Download

66 Offline Analysis Find addresses Get directions
AGSLocator using Locator files Get directions AGSRouteTask using Network dataset Task pattern remains the same Construct & Connect. Path to local data Assign a delegate Set up input parameters. Invoke. Process results. Network Dataset Locator

67 Demo Offline Capabilities
Developing Offline Apps with the Runtime SDKs – Thu, 8:30 AM, Room 33 A

68 Security Common Workflows

69 App Security Services Security ArcGIS Local Data Security

70 How can I protect my App? Use device’s Touch ID App Security
Two Models 1. Local Authentication 2. Integration With Keychain

71 Do the right people have access to services?
Services Security Do the right people have access to services? Authenticate Users Token Based Windows based Ciient Certificate Based Oauth

72 Do people have right access to services?
Services Security Do people have right access to services? Authorize Users Ownership Based Access Control Capabilities Set up at Server/Portal Capabilities: Create,Query

73 Am I connecting to the right server in a secure way?
Services Security Am I connecting to the right server in a secure way? Use SSL Verifies Identify of Server Creates an encrypted link Set up at Server/Portal Use https

74 How can I protect the data in my device?
Local Data Security How can I protect the data in my device? iOS provides Data Protection Default Protected Until First User Authentication - After first unlock since reboot Complete - Available only when unlocked Protected Unless Open - When unlocked - When file is already open No Protection - Always available

75 Local Data Security

76 App Services Local Data
Security Summary Touch ID App Authentication Authorization SSL  Services Data Protection Local Data

77 Runtime Licensing

78 License levels and functionality
Available functionality Developer (development and testing only) All functionality (watermarks and debug messages will be generated) Basic Connected - all functionality Offline - map viewing only Standard Connected and offline - all functionality, includes: Local locators (geocoding) Local routing Local geodatabase editing Local geodatabase sync operations

79 How to license your app at the basic level
Under Application section, create a New Application (or select existing) Click on Runtime SDK Licensing Copy the Client ID and use it to set your clientID 2 1 //Set client ID AGSRuntimeEnvironment. setClientID("DuxuhOEH9dAC4JCY”, error:nil)

80 How to license your app at the standard level
You have 2 options: Use an organization account (ArcGIS Online or Portal for ArcGIS) Requires users of your app to log in with their account Use a license string obtained from Customer Service or your international distributor License burnt into the app //Set license code AGSRuntimeEnvironment.license().setLicenseCode(”<code>”)

81 Recap Common functionality & patterns Displaying map content
Searching for content Performing analysis Editing geographic data Offline capabilities Security

82 Thank you Please fill out the survey

83


Download ppt "Developing iOS & Mac apps with ArcGIS Runtime SDK"

Similar presentations


Ads by Google