V100.2 compass tool

1002
3
Jump to solution
01-03-2018 02:02 AM
NorbertThoden
Occasional Contributor III

Happy New Year!

The relase notes of V100.2 (Release notes for 100.2.0—ArcGIS Runtime SDK for Qt | ArcGIS for Developers ) mentions a compass tool:

The compass tool displays the heading of a map or scene when the view is rotated. The tool implements a method that resets the heading of a view back to zero. The UI component included with this tool is represented by a simple compass rose that points to north (zero heading) in the view.

How can i use this tool? Which classes? Where is an example?

Is it really included?

Thx

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ThomasDunn
Occasional Contributor

Norbert,

Greetings from Redlands. While the ArcGIS Runtime APIs are built atop Runtime core and provide consistent functionality across supported platforms, the toolkits serve another purpose. The toolkits provide auxiliary functionality that is apart from the APIs. For example, prior to v100.2, the toolkit provided with the ArcGIS Runtime Qt API provided functionality (like file system access) that was not in Qt QML (from the Qt Company) but was sometimes needed to write apps using just QML.

The ArcGISCompass tool is for use with your Qt Quick UI implementation when you write a C++ app with a QML UI. Under the covers, the ArcGISCompass tool is implemented using ArcGIS Runtime for Qt C++ API because the C++ API is the one you use in this type of app. (The QML and C++ APIs cannot be used together in the same app.)

Here's a simple example of its use in a QML UI.

import Esri.ArcGISRuntime.Toolkit.Controls.CppApi 100.2

// . . .
SceneView {
// ... (some SceneView component declarations...)

  ArcGISCompass {
    id: compass
    autoHideCompass: false
  }
}

TAD

View solution in original post

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

Hi Norbert,

The Compass is located here - arcgis-runtime-toolkit-qt/Import/Esri/ArcGISRuntime/Toolkit/Controls/CppApi at master · Esri/arcgis-... 

It is currently a QML control that works with our C++ API.

We don't yet have an example for how to use this.

- Lucas

NorbertThoden
Occasional Contributor III

Hi Luke!

Thank you for your answer!

Unfortunately the QML based version does not fit to our widghet based application.

A widget based compass will be released with the next patch in Q1/2018?

The idea behind quartz (V100) was to support all platforms with in a uniform way, right?

Thx

0 Kudos
ThomasDunn
Occasional Contributor

Norbert,

Greetings from Redlands. While the ArcGIS Runtime APIs are built atop Runtime core and provide consistent functionality across supported platforms, the toolkits serve another purpose. The toolkits provide auxiliary functionality that is apart from the APIs. For example, prior to v100.2, the toolkit provided with the ArcGIS Runtime Qt API provided functionality (like file system access) that was not in Qt QML (from the Qt Company) but was sometimes needed to write apps using just QML.

The ArcGISCompass tool is for use with your Qt Quick UI implementation when you write a C++ app with a QML UI. Under the covers, the ArcGISCompass tool is implemented using ArcGIS Runtime for Qt C++ API because the C++ API is the one you use in this type of app. (The QML and C++ APIs cannot be used together in the same app.)

Here's a simple example of its use in a QML UI.

import Esri.ArcGISRuntime.Toolkit.Controls.CppApi 100.2

// . . .
SceneView {
// ... (some SceneView component declarations...)

  ArcGISCompass {
    id: compass
    autoHideCompass: false
  }
}

TAD

0 Kudos