Drag Marker

Apr 23, 2010 at 1:29 AM

In GMapMarkerGoogleGreen.cs I found bellow code:

if(!IsDragging)
{

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

}
 else
 {
   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".



Coordinator
Apr 23, 2010 at 5:29 AM

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

Apr 23, 2010 at 5:49 AM

private bool isDragging;
      public bool IsDragging
      {
         get
         {
            return isDragging;
         }
         internal set
         {
            isDragging = value;
         }
      }

Coordinator
Apr 23, 2010 at 6:17 AM

i've just removed it ;}

Apr 23, 2010 at 6:20 AM

ok! Thank you for your reply!

Apr 26, 2010 at 6: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".

Coordinator
Apr 26, 2010 at 6:48 AM

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

Apr 26, 2010 at 7:09 AM

OK, we can implement ourselves.

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

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

Wait for your best solution! 

:)