Page 1 of 1

how to drag Objects on the Map with mouse

Posted: Sun Apr 26, 2009 1:55 pm
by zeeshanprojects
I need an idea how to drag objects like LINE, ELLIPSE,CIRCLE,ICON on the map through mouse using GPS tool with VB.net

RE: how to drag Objects on the Map with mouse

Posted: Mon May 25, 2009 12:06 am
by devprog_nc
Hi,

I didn't find a solution to do this with standard drag and drop.

The only one solution I found is : when I click on a ellipse in the right panel (like a menu of icons), I associate this ellipse to the event mousemove.

And so, I can move ellipe, circle, icon and other form. With the next clic, I consider ellipse on X,Y and cursor become back standard.

Did you find a real drag and drop solution ?

Thank you

Pascal
New Caledonia

RE: how to drag Objects on the Map with mouse

Posted: Mon May 25, 2009 10:37 pm
by bbulla
This is how I do this when I have the entire map object filled with many shapefiles.

1. using MouseDown: click on the map and store the XY position of the click
2. using MouseMove: move the mouse and calculate the change in X and Y of new mouse position; refresh the map
3. using MouseUp: finish and clear all the various position objects used in #1 and #2

It's not totally smooth, but it works good enough. On a PPC it is best to skip refreshing the map, and just redraw the map using MouseUp and the final pointer position.


Brian