Center map on click?

Mar 25, 2010 at 2:03 PM

Great control!  I was wondering if there is a command I can use to center the map at a given mouse location.  I'd like to add it to my onclick or ondoubleclick events.

Coordinator
Mar 25, 2010 at 2:15 PM

MainMap.MouseDoubleClick += new MouseEventHandler(MainMap_MouseDoubleClick);

void MainMap_MouseDoubleClick(object sender, MouseEventArgs e)
{
     MainMap.CurrentPosition = MainMap.FromLocalToLatLng(e.X, e.Y);
}

Mar 25, 2010 at 2:21 PM

Yikes...that was easy.  Thanks!