Hello.
I would like to identify the graphics for a specific point from MultiPointBuilder.
I tried using identifyGraphicsOverlay, but I couldn't figure out how to know the number of the point I clicked on.
So I thought of a way to find and identify the latitude and longitude of the closest point to the clicked point from MultiPointBuilder.
However, I don't like to use this method because it might cause some unexpected glitches.
Is there anything else I can do?
I use ArcGISRuntime version is 100.9.
Solved! Go to Solution.
Sounds like you really want to use multiple Graphics, where each graphic's geometry is a single point rather than a single graphic with a multipoint geometry.
However, you could use GeometryEngine.nearestVertex(), passing in the identified multipoint geometry and the identify map location. This returns a ProximityResult which includes a partIndex and pointIndex.
Hi @Kanzakiryu,
Unfortunately I don't believe there is any way to do what you're wanting. A Multipoint geometry is a single geometry containing multiple points, so if you identify any point of that Multipoint, you will get back the entire Multipoint from the identify operation.
If it is possible, using individual point geometries would alleviate this situation for you. You'd be able to identify every point uniquely.
https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-multipoint.html#details
I hope this helps.
OK, I know.
I'm going to try to do it the way I figured it out.
Sounds like you really want to use multiple Graphics, where each graphic's geometry is a single point rather than a single graphic with a multipoint geometry.
However, you could use GeometryEngine.nearestVertex(), passing in the identified multipoint geometry and the identify map location. This returns a ProximityResult which includes a partIndex and pointIndex.
Oh, great!
This is exactly what I wanted to do!
Thanks you for answer!!!