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?
Solved! Go to Solution.
We do have a sample that adds a polyline on mouse clicks with our Service Area sample.
This code snippet shows the mouseClicked handler and how to get the projected point for the click location
And this code block shows have to add points to a geometry builder and symbolize this on the graphics overlay.
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.
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?
We do have a sample that adds a polyline on mouse clicks with our Service Area sample.
This code snippet shows the mouseClicked handler and how to get the projected point for the click location
And this code block shows have to add points to a geometry builder and symbolize this on the graphics overlay.
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.
@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-runt...
@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.