ThinkGeo.com    |     Documentation    |     Premium Support

Getting coordinates in MouseMove event

I have two textblocks that I’m trying to populate with lat/long values as the mouse moves like doing Map1.MapTools.MouseCoordinate.IsEnabled = true; provides.

So I assign the mousemove event in the .xaml to this function in the code behind:

private void Map1_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
    //code to update values
}

However, I’m unable to get the correct properties off of the MouseEventArgs e. For example, in a MapClickWpfMapEventArgs, there is a WorldX and WorldY property. In the MouseMove event though, there is no such property. Is there some specific ThinkGeo MouseMove function that I’m missing?

Thanks!

Hi Dan,

Please view the sample attached: 8693.zip (101.2 KB)

It shows how to show coordinates in text block.

Regards,

Ethan

Perfect, works great. Thanks!

Hi Dan,

I am glad to hear that’s helpful.

Regards,

Ethan