Returning lat/long?

Topics: Windows Forms
Oct 16, 2011 at 11:02 PM

Hi all,

I'm very new to Gmap.Net and I'm wondering how (in VB.Net) one would move the marker within the map and return the new lat/long.  

Thanks very much,


Oct 17, 2011 at 7:46 AM

marker.Position = new PointLatLng(...

Oct 17, 2011 at 5:05 PM


Thanks very much...but I think I misspoke--what I mean is how can I drag the marker, and capture it's new lat/long?  It won't drag, and I couldn't find a draggable property on either the overlay or marker.  I can drag the map, but the marker and overlay move with it.

I have a google key and a bing key, and I'm setting the initial position by making a call to the respective service and setting the marker based on those return values, and that works excellent.  But I'm in Windows Forms and most examples for what I need are javascript and I'm not sure how I could embed javascript into either the .Net standard web control or the Gmap control.

I might be over thinking this but I had started down the road of moving the marker with code-behind based on mousemove events in the .Net code...but then the math to calculate how many pixels relate to how much of a change in the starting lat/long (with different zoom levels, screen resolutions, etc) seems a challenge.

So I guess the bottom line is I just want to drag the marker, and (to reduce webservice calls) have the user click when he's done dragging and then at that marker position find what the new lat/long is.

Thanks very much for your help,


Oct 17, 2011 at 5:51 PM

i guess you need to forget javascript and look at my c# demos ;}

Oct 17, 2011 at 6:47 PM

Hello JamesKang,

did you implemented the MapControl in an ASP.NET website? Do you have an example for it?



Oct 17, 2011 at 6:55 PM

it has nothing to do with web sites

Oct 17, 2011 at 7:20 PM


If you would be so kind, can you point me to a link with some basic examples in c#?  I'm used to translating C# to VB.Net and I'm just looking for a starting point on how to get the markers or overlays to drag and return coordinates. 

Thanks very much,


Oct 17, 2011 at 7:30 PM

Oct 18, 2011 at 2:02 AM


Thanks very much!  I've got the shell of what I need up and running in VB.  That is some excellent coding, it's a fantastic application.

Thanks again,