38
Luke Smallwood Mary Harvey ArcGIS Runtime SDKs: Working With Your Maps Online and Offline

ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Luke SmallwoodMary Harvey

ArcGIS Runtime SDKs: Working With Your Maps Online and Offline

Page 2: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Agenda: Design for connectivity

Make connectivity part of your application strategy

• 1. Always connected• 2. Always disconnected• 3. Occasionally connected

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

• 4. Consider update strategy

!

Page 3: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Maps

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

- Operational Layers - Symbology- Popups- Basemap Layers- Metadata

Page 4: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

1. Always connected: online web map

Page 5: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Always Connected

• Services Pattern• Editable (services back-end)• Webmap authored with:

- ArcGIS Pro- Online- Runtime

offline map

Page 6: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Online

Webmap

Feature layer

Portal Item type : webmap

Item type : Feature layerOverrides

Feature Service

Feature Service

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 map

Page 7: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Display a webmap

Portal (URL to portal)// handle authentication if required

PortalItem (Portal, item ID of webmap)

Map (PortalItem)

mapView.map = Map

Page 8: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

2. Always disconnected:offline map from ArcGIS Pro

Page 9: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Always disconnected

• Mobile Map and Scene Packages authored with ArcGIS Pro• Read-only workflows• Side loaded or downloaded to the client device• Only option for offline 3D• Expiration with the Publisher Extension• Transportation Networks and Locators

offline mapArcGIS Pro

Page 10: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Offline

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 package

Page 11: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Mary Harvey

Displaying mobile map and scene packages

Page 12: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Display a mobile map or scene package

MobileMapPackage (Path to mobile map package file - .mmpk)

MobileMapPackage.load (…and wait)

mapView.map = MobileMapPackage.maps.first

MobileScenePackage (Path to mobile scene package file - .mspk)

MobileScenePackage.load (…and wait)

sceneView.scene = MobileScenePackage.scenes.first

Page 13: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

3. Occasionally connected:Take web map offline

Page 14: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Occasionally connected

• Web map authored in ArcGIS Online or ArcGIS Enterprise• Enable Offline Mode, Editing and Sync• Downloaded as a Mobile Map Package directory

• Preplanned – author defines offline map• On-demand – user defines offline map

web map

offline map

Page 15: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Data types that can be taken offline

Feature collections

Vector tiles

Tables

Features

Raster tiles

Page 16: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Allow map and data to be taken offline

• Web Map settings

• Service settings- Raster and Vector Tile Services

- Feature services

Page 17: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Preplanned workflow

Area 1Area 1

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

Area 2Area 2

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

Page 18: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

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

Page 19: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Preplanned workflow

Portal backend

RuntimeappRequest a map

area

Download mobile map package

Page 20: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Mary Harvey

Preplanned: Using map areas

Page 21: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Preplanned workflow code

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

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

MapArea = MapAreas[selectedMapArea]

Parameters = OfflineMapTask.createDefaultParameters(mapArea) (…and wait)// adjust parameters to suit your workflow

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

Page 22: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Take web map offline: OfflineMapTask

> Runtime Task pattern

Task

create default parameters

Parametersadjust parameters to suit your workflow

Job Resultstart job...

create Job with parameters

• OfflineMapTask• OfflineMapSyncTask• ExportTilesTask• ExportVectorTileTask• GeodatabaseSyncTask• RouteTask• ...

Page 23: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

On-demand workflow

Use, collect and synchronize

Author map

PortalSpecify parameters

Generate and download mobile map

Runtimeapp

Portal backend

Runtimeapp

Page 24: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

On-demand workflow

• Load online web map• Choose your area and scale range• Create parameters

- Default parameters based on web map author's settings- Schema only- Attachment settings- Download a basemap?- Use a local basemap

• Generate offline map using parameters

Page 25: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Mary Harvey

On-demand: Generate an offline map

Page 26: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

On-demand workflow code

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

Parameters = OfflineMapTask.createDefaultParameters(AOI, scale) (…and wait)// adjust parameters to suit your workflow

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

Page 27: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

4. Update offline maps

Page 28: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Update Strategy

• Always connected:- Online web map – edit service directly

• Always Disconnected:- ArcGIS Pro (read-only) - recreate .mmpk

• Occasionally Connected - Offline Map Sync Task- When do you update?- Download vs Upload

Page 29: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Update an offline map: OfflineMapSyncTask

Author

Preplanned or On-demand Workflow

Edit

Synchronize• Bi-directional• Upload edits only• Download changes only• Read-only scheduled updates

Page 30: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Mary Harvey

Update an offline map

Page 31: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

OfflineMapSyncTask code

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

Parameters = OfflineMapSyncTask.createDefaultParameters() (…and wait)// adjust parameters to suit your workflow

Job = OfflineMapSyncTask.syncOfflineMap(OfflineSyncParameters)

Job.start() (…and wait)

Page 32: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Advanced Design considerations

Page 33: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Service level options

• Use Parameter Overrides for more control

• Take individual layers offline with specific Tasks- ExportTileCacheTask

- Tile package (.tpk)

- ExportVectorTilesTask- Vector tile package (.vtpk) and their associated style resources

- GeodatabaseSyncTask- Sqlite geodatabase (.geodatabase)

Page 34: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Designing for offline - scalability

• Basemap by Reference- Preplanned or On-demand workflows- Author web map with name of local basemap file (.tpk or .vtpk)- Side-load/download basemap ahead of time- Use local file instead of downloading basemap

basemap

web map

offline map

Page 35: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Designing for offline - scalability

• Scheduled Updates- Preplanned workflow (read-only)- Set on the map area by the author- Updates cached on a regular schedule- Highly scalable (many users download the same changes)- UI coming in AGOL later this year

web map

feature service

map areas

offline map

Page 36: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Summary

• Account for connectivity when designing your application- Connected- Always Disconnected- Occasionally connected

• Consider update strategy

• User Session: "Designing ArcGIS solutions for offline use"- 5th November 15:00-15:45 - Salon Heine I and II

Page 37: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”

Complete answersand select “Submit”

Scroll down to find the feedback section

Select the session you attended

Download the Esri Events app and find your event

Please Take Our Survey on the App

Page 38: ArcGIS Runtime SDKs: Working With Your Maps Online and Offline · app. Portal . backend. Runtime. app. On-demand workflow ... -Salon Heine I and II. Complete answers. and select “Submit”