I'm looking for an example that shows how to modify the location of a graphic. Say I added 50 graphics, and later on I need to modify 5. Is there a way to update just the 5 or do I have to clear the layer and add them all back in.
Hi Mauricio Ramirez,
Thanks for reaching out. You can change the geometry of a graphic at any time. So in your example, you can modify the geometries for the 5 graphics you want to change and leave the other 45 alone; you don't need to clear the entire graphicsOverlay collection and start over.
If you need assistance with identifying graphics, we do have a sample for that. I hope this helps.
James,
Thank you for replying. After the graphic is identified, do we just change the geometry for the identified graphic and that's it, or do we then have to add it back to the overlay? The workflow is muddy in my mind.
That's right - you can change the geometry directly on the identified graphic and that's it.
If you're working with our C++ Qt API, then the pointers may actually be different for the graphics returned from an identify operation, but they will reference the same underlying Runtime graphics that exist in the graphics overlay.