Drag Marker

Apr 23, 2010 at 2:29 AM

In GMapMarkerGoogleGreen.cs I found bellow code:


   DrawImageUnscaled(g, Resources.shadow50, LocalPosition.X - 10, LocalPosition.Y - 34);
   DrawImageUnscaled(g, Resources.marker, LocalPosition.X - 10, LocalPosition.Y - 34);

   DrawImageUnscaled(g, Resources.shadow50, LocalPosition.X-10, LocalPosition.Y-40);
   DrawImageUnscaled(g, Resources.bigMarkerGreen, LocalPosition.X-10, LocalPosition.Y-40);
   DrawImageUnscaled(g, Resources.drag_cross_67_16, LocalPosition.X-8, LocalPosition.Y-8);

the IsDragging property is Internal set, but in the project I did not find any code to set it's value. So IsDragging will alway equal to the default value "false".

Apr 23, 2010 at 6:29 AM

it's public, but you have to set it yourself ;]

Apr 23, 2010 at 6:49 AM

private bool isDragging;
      public bool IsDragging
            return isDragging;
         internal set
            isDragging = value;

Apr 23, 2010 at 7:17 AM

i've just removed it ;}

Apr 23, 2010 at 7:20 AM

ok! Thank you for your reply!

Apr 26, 2010 at 7:26 AM

I think remove is not a very nice solution, In my opinion,change "internal set" to "set" is better.

When the user want to drag the marker(change the position), set the IsDragging=true, and when enddrag(e.g. mouse up event) set "IsDragging=false".

Apr 26, 2010 at 7:48 AM

but there is no internal dragging support yet, so i've removed it for now ;}

Apr 26, 2010 at 8:09 AM

OK, we can implement ourselves.

class ExGMapMarker:GMapMarker
      public bool IsDragging{get; set;}

I just thisnk dragging with a cross icon is very cool.

Wait for your best solution!