How to draw a combined Graphics consisting of a circle and a direction line?

475
1
12-08-2020 03:25 AM
FatmaAkdemir
Occasional Contributor

I am currently using ArcGIS Pro 100.0.8 and Esri::ArcGISRuntime::SceneGraphicsView. I need to display moving tracks on map. The track symbol should be a circle with a small line showing the direction of the track. How can I achieve this? Do I have to provide a 3D SimpleMarkerSymbol? If there is any example about a combined Graphic, that would be appreciated.

 

I have attached the appearance of QGraphicsItem that we are currently using for tracks.

Tags (2)
0 Kudos
1 Reply
LucasDanzinger
Esri Frequent Contributor

For the symbol, you have a few options.

 

The simplest would be to create an image of what you want and use PictureMarkerSymbol. The main downside with that is that it won't scale well if you need to increase size of the image. This sample is in 2D but the same workflow will work in 3D - https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/DisplayI... 

 

The next solution would be to design the symbol that you want in ArcGIS Pro and share it via a stylx file. This will give you the most customization. Here is a sample that shows how to consume a style file - https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/DisplayI... 

 

Finally, you could create a multilayer symbol in code. For example, one symbol layer could be the circle and the other symbol layer could be an arrow. For example, VectorMarkerSymbolLayer allows you to define the vector shape of the symbol, similar to an SVG - https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-vectormarkersymbollayer... 

 

Once you have your symbol, you can update the heading  to match the direction of the track using Renderer Scene Properties. Here is a sample showing this https://github.com/Esri/arcgis-runtime-samples-qt/tree/8252c8205325f0b5ce9c1e3145d3ba8c6da744d3/ArcG...