This project has moved and is read-only. For the latest updates, please go here.

Get lat long on mousemove over mapbox

Dec 19, 2014 at 2:08 PM
Edited Dec 20, 2014 at 7:48 AM
I'm displaying a BMP file representing SRTM satelite terrain data using this code
SharpMap.Map map = new SharpMap.Map();
SharpMap.Layers.Layer BMPlayer = new SharpMap.Layers.GdiImageLayer("HeightMap", openFileDialog1.FileName);
I want to show the world latitude/longitude cordinates in the form statusbar as the mouse rolls over the image/map with code something like this
private void mapBox1_MouseMove(object sender, MouseEventArgs e)
        var point = SharpMap.Utilities.Transform.MapToWorld(new PointF(e.X, e.Y), map);
        MessageBox.Show(string.Concat(point.X.ToString(), " ", point.Y.ToString()));
_'ve seen that the mapbox has mouse events, but I can't get the mouse event to fire as the cursor rolls over the map or when I click the map. Help appreciated.