Amp up Your Apps with Maps
What can you do with esri technology?
Data Visualization
3D
Routing
Public Information
Traffic Alerts
Native 3D Interactive Analysis
Native Open Source Example Applications
Jupyter Notebook
ArcGIS Platform
Getting Started
ArcGIS Developer Resources
Building Web Apps
Intro to the ArcGIS API for JavaScript
- Guide
- API Reference
- Many Samples
Hello World + Examples
Hands-on Lab
Why Map + MapView?
Constructor & Properties
-
Consistent across the API
-
All properties of a class can be set within the constructor
-
Or, directly on the Class.
-
Demo
Why Map + MapView?
MapView Properties
- Includes center, extent, graphics…
Using the View Programmatically
-
MapView.extent
-
MapView.scale
-
MapView.zoom
-
MapView.viewpoint
-
MapView.goTo()
Using the View for Navigation
-
User navigation is enabled by default
Hands-on Lab
Handling View Events
Promises
someAsyncFunction().then(callback, errback);
//And we use .when() in the JS API:
someAsyncFunction().when(callback, errback);
Promises
-
Many methods in the API return promises
-
Some classes return a promise
-
Similar to an event listener…but, maintains state
-
Can be called well after initialization
Promises when
Promises Chaining
Autocasting
Long-hand approach
Autocasting
Watching Properties
-
watch (property, callback)
Widgets
Class: esri/widgets/Widget
Popup Widget
-
All Views have a default group
-
Default popup can display generic content
Directions Widget
-
Wraps pre-built search and routing functionality
Hands-on Lab
Hands-on Lab
Add FeatureLayer to WebMap
Hands-on Lab
Renderers
-
Define how to visually represent each feature
-
FeatureLayer, SceneLayer, MapImageLayer, CSVLayer, StreamLayer
-
Example default renderer in FeatureService
Three Types of Renderers
Arcade
-
ArcGIS expression language
-
Custom visualizations and labeling
-
Documentation
-
Demo
Python
Why Python?
- Popularity
- Productivity
- Interoperability
- Solves the “two-language” problem
- Scientific Python ecosystem
- Community
What is the ArcGIS API for Python
ArcGIS
Intro to the ArcGIS API for Python
- Guide
- API Reference
- Many Samples
Quick Overview of the ArcGIS API for Python
-
A Pythonic GIS API
- Corresponds to best practices
- Uses standard Python constructs
- Data structures with clean, readable idioms
- Easy for a Python programmer to use ArcGIS
- Easy for an ArcGIS user to script and automate their GIS
ArcGIS API for Python vs ArcPy
-
ArcGIS API for Python
- Script against a portal
- ArcGIS Online or ArcGIS Enterprise
- Python 3.x
- Analysis, Portal Admin, Content Creation, Big Data Analysis
-
ArcPy
-
ArcGIS Desktop
- ArcMap - Python 2.x
- ArcGIS Pro - 3.x
-
ArcGIS Desktop
- Mostly Geoprocessing
- Some map automation
ArcGIS + Jupyter =
Four Different Personas
-
Analysts and Data Scientists
-
Power Users/Developers
-
Content Publishers
-
Org Adminstrators
Introducing the GIS Module
Your gateway to scripting a Web GIS
Install the ArcGIS API for Python
How do I get the API
- By using Conda
- What is Conda?
You can install the Python API with or without ArcGIS Pro
If you have Pro on your machine, Conda and Jupyter Notebook is already install for you
Install using ArcGIS Pro
Python Package Manager
If you don't have ArcGIS Pro
- You will need to install Anaconda
- https://www.continuum.io/downloads
Install ArcGIS Package
- Type the following into the python command prompt or command prompt
- -conda install -c esri arcgis
Upgrade from Older ArcGIS Package
- Type the following into the python command prompt or command prompt
- -conda upgrade -c esri arcgis
Install the API on a machine without internet access
- Install the latest version of full Anaconda for Python 3x for your OS
- Download the latest version of the ArcGIS API for Python appropriate for your OS from Esri's channel on anaconda.org
- Open your terminal application and install the API
Start Jupyter Notebook
-
Type the following into the python command prompt
- jupyter notebook
Test the Install
from arcgis.gis import GIS
my_gis = GIS()
my_gis.map()
Hands-on Lab
Hands-on Lab
Working with the Map
Features
- Feature individual point
- FeatureSet a collection of Feature objects
- FeatureLayer a published service called feature service
- FeatureLayerCollection collection of layers
Hands-on Lab
Hands-on Lab
Geocoding
arcgis.geocoding module
Geocoding
Points of Interest
- Cultural or geographic landmarks
- Businesses by name or category
- Administrative divisions
Batch Geocoding
Geocode an entire list
Reverse Geocoding
Determines address at a particular x/y location
Hands-on Lab
Network Analysis
arcgis.network.analysis module
Commercial grade, traffic aware routing and directions for multiple travel modes
Network Analysis - Service Areas
Hands-on Lab
Building Native Apps
ArcGIS Runtime Overview
- Esri’s developer product for native app development
- Incorporate ArcGIS functionality into mobile and desktop applications
- Web service client and local (offline) capabilities
- SDKs for .NET (including Xamarin), Android, iOS, Java, Qt, and macOS
ArcGIS Runtime Overview
- High-performance 2D and 3D mapping
-
Integration with Portal, ArcGIS Online, and ArcGIS Server
- Load, edit, and save web maps
- Use map, image, and feature services
- Geoprocessing for complex custom analyses
-
Work offline with local data and functionality
- Read local data (.mmpk, .tpk, etc)
- Geocode and Routing
- Geometric operations (buffer, etc)
- Take web maps offline
- Feature service editing and sync
ArcGIS Runtime Overview
Architecture
- ArcGIS Runtime APIs – public APIs for multiple platforms
- Same capabilities across all APIs
- API surface is tailored to the relevant dev stack
The ArcGIS Runtime SDKs
ArcGIS Runtime SDKs for .NET
What is it?
-
Esri’s developer product for cross-platform .NET app development
- Supports C#, Visual Basic (WPF and UWP only), and XAML
-
Visual Studio Integration
- Project templates
- Designer preview
- Intellisense
- Local NuGet repository
- NuGet package available
-
Build cross-platforms applications for Windows, iOS and Android
- Supports WPF, UWP, Xamarin iOS, Xamarin Android, and Xamarin Forms
ArcGIS Runtime SDKs for iOS/macOS
What is it?
-
Esri’s developer products for iOS/macOS app development
- Support Swift and Objective-C
-
Xcode integration
- Documentation
- Autocomplete
- Playgrounds Support
- CocoaPods Available
ArcGIS Runtime SDK for Android
What is it?
-
Esri’s developer product for Android app development
- Supports Java and Kotlin
-
Access via Esri’s Bintray repository
- Install and use with Gradle tools
- Android Studio
- IntelliJ
ArcGIS Runtime SDK for Java
What is it?
-
Esri’s developer product for JavaFX client applications
- Supports Java and Kotlin
-
Access via Esri’s Bintray repository
- Standard dependency management with Gradle or Maven
- Install and use with ArcGIS Gradle plugin
- Eclipse
- IntelliJ
- Netbeans
- Java IDE that supports Java 8 or 9
- Can use Gluon’s Scene Builder for UI development
ArcGIS Runtime SDK for Qt
What is it?
-
Esri’s developer product for Qt client applications
- Support C++, QML
- Full integration with Qt Creator
- Build cross-platform apps for Windows, Linux, Android, iOS and macOS
- Used by AppStudio (esri.com/appstudio)
Coding 101
Best Practices
Offline vs Online
Performance vs Availability
-
Offline Data and Services
- Sideload data/geocoders/network models for highly interactive performance
- No round-trip to a server
- Consider hybrid online + offline if appropriate
-
Consider Network Availability & Data Qualities:
- Do you need to edit? If not, perhaps side-loading is an option.
- Will many people get the same data? Maybe generate once, sideload often.
- Lots of data changing often? Try to sync when on WiFi.
- How fast is the network in the field?
- How consistent is the network in the field? Patchy?
Perfomance
Work on the device
-
GeometryEngine
- Manipulate geometry on the device
- Buffer, Union, Difference etc.
- Projection
-
Offline Data
- Data on the device for highly interactive performance
- No round-trip to a server
-
Graphics Overlays
- Dynamic Mode (smaller number of moving graphics – good interactive performance)
- Static Mode (large number of graphics – less interactive performance)
ArcGIS Runtime and you
ArcGIS Runtime SDKs
Where to start?
-
Developers Site - developers.arcgis.com
- It is free with your developer account
-
Each SDK
- Guides
- Reference Docs
- Forums
-
GitHub Repos - github.com/esri
- Toolkits
- Samples
DevLabs
- Step-by-step labs
- Less than 20 minutes
- No experience needed
- Learn in any order
Example Apps
-
ArcGIS Runtime in real apps
-
Best practices
-
Kick-start your new app
-
Take what you want
-
Open Source
Example Apps
Example Apps
Adopting the ArcGIS Runtime in Your Apps
How to add it to my existing app?
- Guide Docs
- Step-by-step instructions for adding the Runtime SDK
- Manually add
- Package Managers
- Samples at github.com/esri (search for arcgis-runtime-samples)
- Focused, standalone code snippets
- Functionality-focused
- DevLabs
Adopting the ArcGIS Runtime in Your Apps
Starting a new app?
- IDE Templates where possible (e.g. .NET, Xamarin)
- Guide Docs
- Step-by-step instructions for adding the Runtime SDK
- Manually add
- Package Managers
- Example Apps
- DevLabs
- Samples
UC Berkeley
By dmart
UC Berkeley
workshop
- 1,798