ArcGIS Runtime SDKsBuilding Offline Apps · 2019-03-14 · Design for connectivity. Make...

32
ArcGIS Runtime SDKs Building Offline Apps Nicholas Furness

Transcript of ArcGIS Runtime SDKsBuilding Offline Apps · 2019-03-14 · Design for connectivity. Make...

ArcGIS Runtime SDKsBuilding Offline AppsNicholas Furness

Connected

Always disconnected

Occasionally disconnected

• Temporary interruptions due to connection problems• Deliberate remote working• Plan work as if in disconnected environment

Design for connectivityMake connectivity part of your application strategy

• Central concept in ArcGIS• Authored using the ArcGIS Platform• Can be consumed by multiple applications• Updates can be shared• Contains

- Operational Layers- Feature layers

- Basemap Layers- Tiled layers- Vector tiled layers

- Metadata

Maps

Webmap

Feature layer

Item type : webmap

Item type : Feature layerOverrides

Feature Service

Feature Service

Raster Tile Service

Vector Tile Service

Vector tile layer

Item type : Vector Tile Layer Resources

Vector Tile Service

Map

Tile layer

Feature layer

Feature layer

Feature layer

Feature layer

Vector Tile layer

Vector Tile layer

Web mapOnline

Map

Resources

Tile layer

Feature layer

Feature layer

Vector Tile layer

Vector Tile layer

tpk

geodatabase

vtpk

vtpk

Feature layer

overrides

geodatabase

Item info

Mobile map packageOffline

• Always Disconnected maps- Authored using ArcGIS Pro- Side loaded to the devices- Read only- Mobile Map Packages

• Occasionally Connected maps- Authored using ArcGIS Online/Portal- Downloaded to device using ArcGIS Runtime- Edit and Sync enabled- Mobile Map Packages

Offline workflows

!

!

Always Disconnected

• Mobile Map Packages authored with ArcGIS Pro• Supports Read-only• Has to be side loaded to the client device

• NOTE:- Locators and transportation networks need to be created with

this pattern- Street Map Premium for ArcGIS offers very good dataset for

disconnected scenarios - Contains basemap- Locator- Network dataset

ArcGIS Pro

• Geoprocessing Tool• Data Management Toolbox• Package Toolset• Create Mobile Map Package

ArcGIS Runtime for iOS 100.4

Demo :

Displaying maps from a mobile map package

MobileMapPackage (Path to mobile map package file)

MobileMapPackage.load (…and wait)

mapView.map = MobileMapPackage.maps[0]

Display a mobile map package !

• Always Disconnected maps- Authored using ArcGIS Pro- Side loaded to the devices- Read only- Mobile Map Packages

• Occasionally Connected maps- Authored using ArcGIS Online/Portal- Downloaded to device using ArcGIS Runtime- Edit offline- Sync (when reconnected)- Mobile Map Packages

Offline workflows

!

Occasionally connected maps

• Web map authored in ArcGIS Online or Portal

• Support Take Map Offline and Enable Editing and Sync

• Downloaded as a Mobile Map Package

• Two workflows:- Preplanned – author defines offline map- On-demand – user defines offline map

Data types that can be taken offline

Feature collections

Vector tiles

Tables

Features

Raster tiles

Allow map and data to be taken offline• Web Map settings

• Service settings- Raster and Vector Tile Services

- Feature services

Area 1Area 1

Portal Item : map area Portal Items : tpks, vtpks,geodatabases

Preplanned workflow

Area 2Area 2

Portal Item : map area Portal Items : tpks, vtpks, geodatabases

Webmap Map Area

Package

geodatabase

tpkItem type : webmap

Item type : map area Item type : Tile package

Item type : SQLite geodatabase

Map Area

Area

Package

Package

Item type : Vector Tile package

vtpk

Map

Preplanned map areas

Preplanned workflow

Author map and map areas

Use, collect and synchronize

Portal Runtimeapp

Generate mobile map package

Portal backend

RuntimeappRequest a map

area

Download mobile map package

Preplanned workflowPortal backend

RuntimeappRequest a map

area

Download mobile map package

Demo :

Authoring and Consume Map Area

ArcGIS Runtime SDK for Qt 100.4

OfflineMapTask (webmap)OfflineMapTask.load (…and wait)

Collection of MapAreas = OfflineMapTask.preplannedMapAreas (…and wait)

Job = OfflineMapTask.downloadPreplannedMapArea(selectedMapArea, download path)Job.start (…and wait)mapView.map = Job.result.offlineMap

Preplanned Workflow code

On-demand workflow

Use, collect and synchronize

Author map

PortalSpecify parameters

Generate and download mobile map

Runtimeapp

Portal backend

Runtimeapp

On-demand parameters

Specify parameters

Generate and download mobile map

RuntimePortal backend

Map Level Parameters:• Area of Interest• Min & Max Scale• Basemap• Attachments• Definition Expression• Related tables

Layer Level Parameter• Feature Layer• Tiles and Vector Tiles

ArcGIS Runtime SDK for Qt 100.4

Demo :

Take map offline on-demand

On-demand Workflow code

OfflineMapTask (webmap)OfflineMapTask.load (…and wait)

Parameters = OfflineMapTask.createDefaultParameters(AOI, scale) (…and wait)Parameters.includeBasemap = falseParameters…

Job = OfflineMapTask.generateOfflineMapJob(Parameters, download path)Job.start() (…and wait)mapView.map = Job.result.offlineMap

Edit and Sync an Offline Map

Author

Preplanned or On-demand Workflow

Edit

Synchronize• Bi-directional• Upload edits only• Download changes only

OfflineMapSyncTask(offlinemap)OfflineMapSyncTask.load() (…and wait)

OfflineSyncParameters.syncDirection = BiDirectional

Job = OfflineMapSyncTask.syncOfflineMap(OfflineSyncParameters)

Job.start() (…and wait)

Synchronize the whole Offline Map

OfflineMapSyncTask

• Targets every feature layer in the map• Simply with limited options• Designed to work with OfflineMapTask

Editing supportedSynchronize changes – Bidirectional, Upload, Download

Licensing at Basic Level(View only? Licensing at Lite Level)

On-demand workflowUser defines map on ad-hoc basisResponsive to users situationLots of control over the map and individual layersDownloaded map content is always current

Occasionally connected map workflows

Preplanned workflowManager defines map areas ahead of workFaster downloadReduces the load on the Server as map generation can be scheduledMany users can download the same mobile map package

Advanced – for even more control!• Take individual layers offline

• Tiled ArcGIS Map service- ExportTileCacheTask- Tile package (.tpk)

• ArcGIS Vector Tile services- ExportVectorTilesTask- Vector tile package (.vtpk) and their associated style resources

• Feature Layer- GeodatabaseSyncTask- Sqllite geodatabase (.geodatabase)

Developers Guide Doc– developers.arcgis.com

- Account for connectivity when designing your application- Connected- Always Disconnected

- Occasionally Connected- Preplanned- On-Demand- Sync Map- Take individual layers offline

Summary

Please Take Our Survey on the AppDownload the Esri Events app and find your event

Select the session you attended

Scroll down to find the feedback section

Complete answersand select “Submit”