We want to provide user a ruler that shows the distance between 2 points that are clicked by user? Is there a way to do that?
@FatmaAkdemir ,
We do have a sample that adds a polyline on mouse clicks with our Service Area sample.
https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Routing/ServiceArea
This code snippet shows the mouseClicked handler and how to get the projected point for the click location
https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_CppSamples/Routing/ServiceArea/ServiceArea.cpp#L259-L286
And this code block shows have to add points to a geometry builder and symbolize this on the graphics overlay.
https://github.com/Esri/arcgis-runtime-samples-qt/blob/master/ArcGISRuntimeSDKQt_CppSamples/Routing/ServiceArea/ServiceArea.cpp#L295-L309
We are working on the Sketch Editor for Qt and hope to have this ready for the next release. That will be a big improvement in the sketching experience.
We also have a ShowLocationHistory sample that adds points as "breadcrumbs" to a polyline via PolylineBuilder.
https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Maps/ShowLocationHistory
Hi @FatmaAkdemir .
That is likely a feature that would be in our toolkit but we don't have any such toolkit component right now. I assume you know how to get the distance with the GeometryEngine, but are looking for a UI element to display on screen representing a ruler, is that correct?
Hi @JamesBallard1 ,
Yeah I was looking for a ready to use Ui element for ruler. Can I find an example in github which allows user to draw a line or polygon with mouse?
@FatmaAkdemir the 100.12 release of ArcGIS Runtime now supports a SketchEditor, which greatly simplifies the workflow for sketching geometries on a map. This might be something worth considering integrating into your app. More details are in the release blog - https://community.esri.com/t5/arcgis-runtime-sdks-blog/sketcheditor-now-available-in-the-arcgis-runtime/ba-p/1094221
@LucasDanzingerthanks for the info! It looks great. We are currently using 100.8. If we upgrade to 100.12, I am sure we will add this feature to our project.
Hi @LucasDanzinger ,
Hope you're well! One simple question we have : Is there any way to use SketchEditor on 3D SceneGraphicsView instead of MapView?
No, SketchEditor only works in 2D MapView currently.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.