Select to view content in your preferred language

API's for Drawing shapes and HitTest

1966
11
09-01-2018 09:45 AM
VishnuB
New Contributor III

Hi,

I am using ArcGIS Runtime 100.2.1 for Qt. Few days back i have gone through some sample runtime application for WPF. In that i saw many useful and easy API's for creating geometries and identifying graphics layers 

// Wait for user to draw
var geom = await MyMapView.Editor.RequestShapeAsync(DrawShape.Polygon);

//Hit test whlie mouse hovering

var graphic = await _graphicsLayer.HitTestAsync(MyMapView, screenPoint);

Is there any similar kind of API's available in Runtime sdk for Qt?

Thank You

Vishnu B

0 Kudos
11 Replies
BradDuBois
New Contributor II

I'm curious about the difference between using the componentComplete override vs making the sceneview a Q_PROPERTY.  Are there specific advantages by doing it the way you did in your TubeSymbol example with the Q_PROPERTY vs how the samples that I have seen use the componentComplete method to initiate the class members?

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Both work, but if you are starting out fresh, I'd use the Q_PROPERTY workflow. The componentComplete was the original pattern we used in our samples, but we recently attended the Qt World Summit where they discouraged the use of `findChild` if possible (e.g. m_sceneView = findChild<SceneQuickView*>("sceneView");), so we looked for a new pattern and settled on Q_PROPERTY (I don't recall the reason offhand for why they discouraged the use of this function). We've been using this new pattern for new samples and our SDK template projects but haven't gotten around to going back through old samples to refactor yet.

0 Kudos