23
ArcGIS Runtime SDKs: Using Qt to Build Native Cross-platform Apps Eric Bader @ECBader @ArcGISRuntime

ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

ArcGIS Runtime SDKs:

Using Qt to Build Native Cross-platform

Apps

Eric Bader

@ECBader

@ArcGISRuntime

Page 2: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Agenda

• The case for native apps

• What we mean by Cross-platform

• QML, C++, Apps, and the ArcGIS Runtime SDK for Qt

• Build once, compile it for many

• What’s ahead

• Questions

Page 3: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Why build native apps?

• Work online & offline

• Access hardware and sensors

- GPS, camera, Bluetooth, NFC, etc

• Great performance

• Publish apps to stores

Page 4: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

The challenge

• Lots of platforms

• Lots of devices

• Unique development patterns

- Languages

- Frameworks

- IDEs

- Workflows

iOS

AndroidWindows

Linux

Mac OS X

iPhone

iPad

MacBook

Galaxy S 5

Nexus 10Surface

Windows

Desktop

Embedded

XCode

Swift Objective C

Java

Android

Studio

Eclipse

.NET

C#

Visual

Studio

Windows

Universal

Cocoa

Gradle

Page 5: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Qt and QML

• Cross platform framework

• Build native apps

• Same source code compiled for each platform

• Powered by C++ on the backend (very fast)

• Exposed through QML (based on JavaScript)

• ArcGIS Runtime SDK for Qt

- Mapping API provided by Esri

- Brings the power of ArcGIS to your devices

Page 6: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

ArcGIS Runtime Functionality

• Build apps for any platform, any device (almost)

• Visualize geographic data – maps, layers, graphics

- feature, dynamic, tiled, raster, …

• Identify features, query data, and display info pop-ups

• Share maps and content across ArcGIS platform

• Offline maps, data, routing, geocoding

• Powerful analysis and local geometric operations

• Loadable resources

• Async APIs

Page 7: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

QML

Highly

readable

JSON/CSS-

like syntax

Imperative

JavaScript

Code to handle

events

Dynamic

property

binding

Declarative

UI elements

ArcGIS

Runtime

Page 8: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

QML front-end, C++ back-end

Cross platform

Qt – C++

QtQuick QtWidgetQtQuick

Qml

UI

Runtime Api

Desktop only

Page 9: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Highly-recommended reading

“Qt Quick - How to write a cross platform mapping application with a QML front-end and C++

back-end” - Lucas Danzinger

https://geonet.esri.com/community/developers/native-app-developers/arcgis-runtime-

sdk-for-qt/blog/2016/12/19/qt-quick-how-to-write-a-cross-platform-mapping-

application-with-a-qml-frontend-and-c-backend

To get there:

1. On http://developers.arcgis.com/qt , click the “Forum” tab

2. On the GeoNet page, click the “Content” tab, then the green icon (Blogs)

Page 10: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

About the QML and C++ APIs in ArcGIS Runtime SDK for Qt

• 1 SDK – 2 APIs

• Functionally equivalent

• Don’t use components of the C++ and QML APIs together in the same app

• JavaScript skills come in handy in the QML tier

• Use C++ backend for compute-intensive app logic

Page 11: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

What You Need for Development

• Windows + Visual Studio (2015), Linux, or macOS

• Qt SDK and Qt Creator from The Qt Company – http://qt.io

• OpenSSL for connected/secured services– need to get these binaries separately

Building for Android devices?

- OS: Windows, macOS, Linux

- The Android SDK & NDK bits

- Ant

- Java Developer Kit (JDK)

• Building for iOS devices?

- OS: macOS

- Xcode

- Apple Developer Subscription

• ArcGIS Runtime SDK for Qt - http://developers.arcgis.com/qt

Do NOT WORRY – you don’t need to know how to

program Android or iOS!

Page 12: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Installing the Qt SDK on Windows

Page 13: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Installing the Qt SDK on Mac

Page 14: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Let’s see it in

action!

Page 15: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

The Esri GeoServices Plugin

• Connects Qt-based apps to Esri’s ArcGIS Online services

https://doc-snapshots.qt.io/qt5-5.8/location-plugin-esri.html

• Add Esri basemaps to your applications

- 12 different styles

• Locate addresses and coordinates

- Uses ArcGIS Online Geosearch Service

• Solve Point-to-point routing *

- Uses ArcGIS Online Routing Service

* A token is only needed for routing

Page 16: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Esri GeoServices

Plugin demo

Page 17: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

What’s ahead…

Page 18: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

100.1

10.2.x equivalency

TodayQ2

2017

ArcGIS Runtime 2017 Release Schedule

Q42017

100.2

The ‘Engine’

release

100.0

Page 19: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Update 1 – Equivalency with 10.2.x

• Complete the 3D viewing support for mobile devices

• WMTS layer

• Related tables

• Toolkits*

• Coordinate conversion operations

SUBJECT TO CHANGE!

Page 20: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Update 2 – the ‘Engine’ release

• Geopackage layers – vector and raster

• WMS layers

• KML layers

• Custom transformations

• Time-aware layers

• Toolkits*

• Lots more 3D capabilities….

SUBJECT TO CHANGE!

Page 21: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Resources

• Developer Resources –

- http://developers.arcgis.com/qt

• Connect with us on GeoNet –

- https://geonet.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-

for-qt

• All samples are shared on GitHub –

- https://github.com/Esri/arcgis-runtime-samples-qt

• QML Toolkit source code also on GitHub –

- https://github.com/Esri/arcgis-runtime-toolkit-qt

Page 22: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML

Questions?

Page 23: ArcGIS Runtime SDKs: Using QML to Build Native Cross-platform Appsproceedings.esri.com/library/userconf/devsummit-dc17/... · 2017. 2. 28. · Title: ArcGIS Runtime SDKs: Using QML