Is there a way to understand that user clicks on a specific Graphic on the map?
Solved! Go to Solution.
Yep. If you want to know for a specific GraphicsOverlay, you can call GeoView.indentifyGraphicsOverlay() and pass in the graphics overlay in question. If you want to consider all the GraphicsOverlays in your MapView, you can call GeoView.indentifyGraphicsOverlays().
There are also overrides that allow you to specify a max number of results to return. See the full list here.
Yep. If you want to know for a specific GraphicsOverlay, you can call GeoView.indentifyGraphicsOverlay() and pass in the graphics overlay in question. If you want to consider all the GraphicsOverlays in your MapView, you can call GeoView.indentifyGraphicsOverlays().
There are also overrides that allow you to specify a max number of results to return. See the full list here.
Hi @Nicholas-Furness ,
I managed to get the clicked Graphic by using the method you suggested. However I am getting segmentation faults while dynamic casting the Graphic to the class that inherits the Graphic.
mpSelectedRulerNode->setGeometry(destinationPoint);
Even if I don't make any dynamic_cast, above code causes a SEGFAULT.
Hi Fatma,
Are you able to post any code that recreates this issue, or a crash-dump? I suspect that either `mpSelectedRulerNode` or `destinationPoint` are being used after deletion.