Hit the Ground RunningArcGIS Runtime SDK for Android
Dan O’Neill - @jdoneillXueming Wu
Presenters
Agenda◆ Introduction to the Android SDK◆ Maps & Layers◆ Analysis & Display Information◆ Place Search◆ Offline Patterns◆ What’s coming ...
Dan O’NeillAndroid SDK Intro
ArcGIS Runtime
Introduction to the Android SDK - Dependencies
• Java Development Kit (JDK) 7+• Android API 15 +• Android Studio
- Mac OS - run Android Studio with Java Runtime Environment (JRE) 6- Configure project to use JDK 7+
Optional➔ Manage SDK locally in Eclipse/NetBeans
Introduction to the Android SDK - Features
• SDK distributed through public maven repository- http://dl.bintray.com/esri/arcgis
• Direct support for Android Studio & Gradle project structure• Samples Open Sourced through GitHub
- https://github.com/Esri/arcgis-runtime-samples-android• Documentation available through developers site
- http://developers.arcgis.com/android
Support for using 10.2.5 in Eclipse and Android Studiohttps://github.com/Esri/gradle-eclipse-studio-android
Introduction to the Android SDK - Gradle Dependency
• Define the repository in the project Root build.xml file
• Define the ArcGIS Android AAR in your app project build.xml file
Dan O’NeillMaps & Layers
Maps & Layers - Layer Types
• DynamicLayer• FeatureLayer• GraphicsLayer• GroupLayer• KmlLayer• RasterLayer• TiledLayer
Maps & Layers - DynamicLayer
• Abstract Base Class• Sub-classes
- ArcGISDynamicServiceLayer- ArcGISImageServiceLayer- WMSLayer
Maps & Layers - TiledLayer
• Abstract Base Class• Direct sub-classes
- ArcGISLocalTiledLayer- TiledServiceLayer
• Indirect sub-classes- ArcGISTiledMapServiceLayer- BingMapsLayer- OpenStreetMapLayer- WMTSLayer
Maps & Layers - GraphicsLayer
• Layer representing one or more Graphics- Dynamically display Graphics on a MapView- Graphics can be geometries or features
• MapView can contain one or more GraphicLayers
Maps & Layers - Simplified Basemaps
• Switch Basemaps from MapOptions.MapType• Supported types
- Gray- Hybrid- National Geographic- Oceans- Open Street Map- Satellite- Streets- Topo
Maps & Layers - Simplified Basemaps
➔ Switch layers based on selection
Xueming WuFeature Analysis
Why analyze
• Convert data into information
• Adds values
- answers questions
- more than just points on maps
• Services available in ArcGIS Online
- Builds into your apps
Feature Analysis - query features
• Query features- Retrieve features from a single layer or table in a map service
or a feature service - Query or Query Related Records operation - Performs attribute and spatial queries- Retrieves
- only IDs - attributes - actual features
Query Features - QueryTask
• General workflows:- Create a QueryTask- Create a QueryParameters or RelatedQueryParameters that define the
task- Execute the task- Retrieve the results- Handle any errors
Query Features - QueryTask
• QueryParameters or RelatedQueryParameters:- Attribute queries through setWhere()- Spatial queries through setGeometry()- Retrieve only IDs by setReturnIdsOnly()- Retrieve attributes or actual features by setReturnGeometry()- Returned features in specific spatialreference by
setOutSpatialReference()- Limit the number of features by setMaxFeatures()
Query Features - QueryTask
Feature Analysis - identify features
• Identify features- Search features intersecting with a geometry from a layer in a map
service - Retrieves
- attributes - actual features
Query Features - IdentifyTask
• General workflows:- Create a IdentifyTask- Create a IdentifyParameters that define the task- Execute the task- Retrieve the results- Handle any errors
Feature Analysis - display information
• Callout- Simplified Callout
• Popup- Simplified Popup
Display Information - Popup
• Provides UI and behaviors for displaying and editing features• Respects types/domains• Supports adding attachments• Supports editor tracking• Has hooks
- For editing geometries- For deleting geometries
• Works with developer defined as well as webmap popups• Sample In SDK
- PopupInWebmapForViewing- PopupInWebmapForEditing
• Requires Android support library to run!!!
Popup - general workflow
• Display information using pop-ups- Instantiate PopupContainer- Create a Popup and add it to the PopupContainer- Display PopupContainerView
• Handle user interaction• Edit information using pop-ups• Customize UI
Popup
Popup - simplification
Xueming WuPlace Search
Place Search - geocoding
• ArcGIS Geocoding service- Global coverage
• Locator uses this in default constructor• Find method allows for address and POI search• Point and radius parameters
- Results in radius are promoted- Sorted by distance to point- Results outside radius still returned
Place Search - geocoding
Locator.find()
Place Search - search suggestions
Locator.suggestion()
Place Search - search suggestions
Place Search - simplification
• ArcGIS Android Toolkit API• Provides GeocodeHelper class• Find address for given location• Simplifies the workflow
- No need to set parameters and get result from a Locator
Place Search - demo
https://github.com/Esri/arcgis-runtime-samples-android/tree/master/PlaceSearch
Dan O’NeillOffline Patterns
Offline Patterns - Create Offline Maps
Offline Patterns - Workflows
● Take Map Offline○ View / Basemap○ Edit○ Sync
● Perform Offline Tasks○ Routing○ Geocoding○ Query
● Create Your Own Layer○ Define layer and symbology○ Persist it to device
Offline Patterns - Basemaps
● From a Tiled Service○ TPK or Compact Cache○ Service must support exportTiles operation
● Requesting a Tile Cache parameters○ Level Of Details (LOD)○ Level ID’s supported○ Extent of the Tile Cache○ SpatialReference
Offline Patterns - Custom Layers
● Base Abstract Class – TiledServiceLayer○ Used by
■ ArcGISTiledMapServiceLayer
■ BingMapsLayer
■ OpenStreetMapLayer
● Fetch Tiles○ Implement abstract getTile() method
Offline Samples in the SDK
● Local Tile Layer● Local MBTiles● Local Raster Data● Create Local Geodatabase● Offline Editor● Offline Analysis● Export Tile Cache● Offline Routing and Geocoding● Standard License Offline
What’s coming?
ArcGIS Runtime Quartz
Numbers were not working, so we picked something solid, sharp and
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
Quartz beta release
Today Q2Beta
ArcGIS Runtime Release Schedule
Q42015
Quartz final release
Agenda◆ Introduction to the Android SDK◆ Maps & Layers◆ Analysis & Display Information◆ Place Search◆ Offline Patterns◆ What’s coming ...
Please Rate our Session
QUESTIONS
Thank You
Devsummit Runtime sessions
ArcGIS Runtime SDK sessions WednesdaySession Name Time Location
Building Great Android App Uis and UXs 4:00pm – 5:00pm Mojave Learning Center
Session Name Time Location
ArcGIS Runtime SDKs: Building Offline Apps, Part I
9:00 – 10:00am Primrose A
ArcGIS Runtime SDK: Building Offline Apps, Part II
10:30– 11:30am Primrose A
ArcGIS Runtime SDKs: Offline Routing and Geocoding
4:00-5:00pm Smoketree A-E
ArcGIS Runtime SDKs: Implementing 3D Capabilities
5:30 – 6:30pm Primrose C/D
Collector for ArcGIS: How we did it 5:30 – 6:30pm San Jacinto
ArcGIS Runtime SDK sessions Thursday
ArcGIS Runtime SDK sessions Friday
Session Name Time Location
The Road Ahead: ArcGIS Runtime 8:30 – 9:30am Primrose A
Everything (or Anything) You Wanted to Know about the ArcGIS Runtime SDKs
but Were Afraid to Ask
10:00 – 11:00am Primrose A
The Road Ahead: Web 3D and Native Mobile Apps
10:00 – 11:00am Primrose C/D