Is there an easy way to get the midpoint of a user-digitized polyline graphic? I've been looking through the API docs and there doesn't seem to be a direct path to get that map point.
Thanks Morten ...
The next update is right around the corner, and it adds a new "CreatePointAlong" method to GeometryEngine, so you can do this:
Polyline pl = new Polyline(...)
var length = Esri.ArcGISRuntime.Geometry.GeometryEngine.Length(pl);var midPoint = Esri.ArcGISRuntime.Geometry.GeometryEngine.CreatePointAlong(pl, length / 2);
So keep an eye on the nuget package update very soon...
If you can't wait, you'll have to do it "oldschool" by measuring segment by segment adding up the distance, until you exceed it, then use trigonometry to calculate the fraction along that segment to get to the point.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.