Building Offline Apps with the ArcGIS Runtime SDKs – Part 2
Will Crick, Justin Colville, Euan Cameron
Agenda
• Part One – Workflows and Data- What can you build?- Where does the data come from?- Authoring and sharing content with Runtime Apps
• Part Two – Using the APIs- Mapping- Editing- GeoCoding- Networks- What’s changed since Beta- What’s coming
Runtime platforms
QT
OS X
Windows Store
JavaSE
iOS
Android
Windows Phone
Mobile
Desktop
Embedded
.NET
Windows Desktop
Working With Basemaps Offline
• ArcGIS Desktop Can Create Tile Caches• Esri Basemaps
- http://tiledbasemaps.arcgis.com/…- AGOL basemap group
• ArcGIS Server Tiled Map Services• Services Limit Extent
- Administrator Sets the Limit- Workable Size
- Compression quality- Estimations
• Consider Reusing Offline Basemaps
Psuedo/Code snippets
task = new ExportTileCacheTask(url);
params = new ExportTileCacheParams();params.setLevelsOfDetail( [1,2,3,4] );params.setAreaOfInterest( geometry );
task.estimateTileCacheSize( params); //async
task.exportTileCache( params, path ); //async
SubmitJobPoll for statusDownload when completeSome platforms handle partial downloads
Justin
Taking ArcGIS Online Basemaps Offline
Demo
Working With Operational Data OfflineIt is all about the features
• Read only access• Work with Attachments and Relates• Edit Features• Use Popups• Sync Changes with a Server
Syncing With a Server
• Send Edits• Versioned Data – download & upload – new at server 10.3! (in session I said
this was download only, sorry!)• Per Layer Sync – non versioned data• Per Geodatabase Sync – versioned data• Control Over Sync Direction
- None- Download changes only- Upload edits only- Download changes and upload edits - bidirectional
Generating a Geodatabase and Showing Features
GeodatabaseSyncTask
Geodatabase
GeodatabaseFeatureTable
GeodatabaseFeature
FeatureLayer
Layer
Graphic
Feature
fetchFeatureServiceInfo()new GenerateParams(fsInfo) - generateGeodatabase(params)
Geodatabase.getSyncParams() - syncGeodatabase()isSyncEnabled()
getFeatureTables()hasLocalEdits()
createNewFeature()queryRelated()getAttachments()getFields()
getFeatures(x,y)selectFeatures()get/setRenderer()hideFeature()
geometry()attributes()
FeatureTableadd()update()delete()query() getFields()
How Does Sync Work?The Flow of Data
Generategeodatabase
enabled for sync
Feature servicewith sync enabled
Adds, edits, deletes Generate delta geodatabase
Upload delta
Retrieve response
Apply response to geodatabase
Feature Service Table
SamplesOfflineEditor
Offline Features
Demo
Working With Locators Offline
• Prepared for Offline Use Using ArcGIS Desktop• Programming Model Similar to Online Locators• High Performance
Locator psuedo code
• task = new Locator(path);
• //geocode• params.setText(“”);• task.findAddress(); //async
• //reverse geocode• task.findLocation(point);
Justin
Offline Locators
Demo
Working With Networks Offline
• Prepared for Offline Use Using ArcGIS Desktop• Programming Model Similar to Online Networks• High Performance
Routing psuedo code
• task = new RouteTask(path);
• params = task.retrieveDefaultRouteTaskParams();• params.setStops(NAFeatures);
• task.solve(); //async
Justin
Offline Networks
Demo
App development
• Killed/exited apps- Hold on to params (or with iOS jobid) and resubmit same job (with use cached
job=true)- If job still exists on the server, will not resubmit job- If partial download on disk, will not resubmit job- If error, will resubmit job
• Apparent sync failure due to network issues• Backgrounded iOS apps
- Go to iOS session!
• Large data over 3G- Check for wifi access for ExportTilecCacheTask??
Licensing Offline Capabilities
• Viewing Vector and Raster Data- Basic License
• Offline Feature Editing, Geocoding and Networks- Standard License
What’s coming?
ArcGIS Runtime Quartz
Numbers were not working, so we picked something solid, sharp and shiny….
Quartz
• Major release- Many new capabilities- New and changed APIs- Improved internal architecture
• Goals- Support the ArcGIS Platform- Move ArcGIS Engine developers to the ArcGIS Runtime- Synchronize APIs across all ArcGIS Runtime platforms- Support specific user workflows
What does Quartz include?
• Working with maps- New Map object central to the API- Create, edit and share maps across the ArcGIS Platform (Online, Portal, Pro)- Offline maps
- Take a map (and its layers) offline using a task- Author offline maps- Provision offline maps (from ArcGIS Pro and other Runtime Apps) with Mobile Map
Packages
• Working with Portals- Find, upload, share and configure- Authentication made easy
New 3D, layer and analysis capabilities
• Working with scenes for 3D- Scenes work everywhere
• Working with layers- New layer types
- Raster layer, scene layer, KML layer- Feature layer support for local GIS data
- Mobile geodatabase (from ArcGIS Pro), geopackage, shapefile- Richer symbology
- New renderers - heatmap, dot density, scale dependent, dictionary- New symbology model - proportional size, color, transparency- Advanced symbology – from ArcGIS Pro
- Analysis- On the fly visual analysis – viewshed, line of sight- Raster layer with a Function Raster
All this requires new and changed apis…
MapView Map
Layer*
FeatureLayer RasterLayer MapImageLayer KMLLayer
Quartz Beta begin
Today Q22015
ArcGIS Runtime Release Schedule
Q42015
Quartz Final release
Feb
10.2.5Qt /QML SDK
May
10.2.63D .Net SDK
Questions?
Rate This Sessionwww.esri.com/RateMyDevSummitSession