Is there any way to move a graphic with a mouse drag?

827
1
Jump to solution
08-18-2017 09:15 AM
NicholasLiccini
New Contributor II

Hi!

I am using ArcGIS Runtime 100.1 for Qt/C++, and I'm wondering something that may be very simple about moving graphics. 

Say you make a polyline from mouse clicks on the map. Is it possible to press and hold on one of the vertices to drag it to another location and redraw the line?

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

This is technically possible by using the various GeometryBuilder classes. You can edit the vertices of the geometry to be where the Mouse cursor is, and update a Graphic's geometry to make the graphic follow it. We plan on eventually implementing a simplified API for this, as well as a toolkit component that will provide UI elements for sketching and editing.

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

This is technically possible by using the various GeometryBuilder classes. You can edit the vertices of the geometry to be where the Mouse cursor is, and update a Graphic's geometry to make the graphic follow it. We plan on eventually implementing a simplified API for this, as well as a toolkit component that will provide UI elements for sketching and editing.