I am working on gMap.NET and currently I tried to print out the longitude and latitude of a point on the map when user clicks on it.
I have been trying this, as shown in another question Location information where mouse click on the map GMap.net
private void gMapControl_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
double lat = gm1.FromLocalToLatLng(e.X, e.Y).Lat;
double lng = gm1.FromLocalToLatLng(e.X, e.Y).Lng;
Console.WriteLine(lat);
Console.WriteLine(lng);
}
}
However, nothing shows up in the console. Does anyone know what should I do?
Thank you