コード例 #1
0
 private void map_MouseClick(object sender, MapMouseEventArgs e)
 {
     if (DwType != DrawType.None)
     {
         e.Handled = true;
         Location location = map.ViewportPointToLocation(e.ViewportPoint);
         StartDraw(location);
     }
 }
コード例 #2
0
ファイル: MapCtrl.xaml.cs プロジェクト: ll3v3ll/SWE7903
        private void RetreiveLatLongs(Microsoft.Maps.MapControl.Map map)
        {
            Location topLeft_L  = map.ViewportPointToLocation(topLeft_P);
            Location botRight_L = map.ViewportPointToLocation(botRight_P);
            Location center_L   = map.ViewportPointToLocation(center_P);

            latStart = topLeft_L.Latitude;
            latitude = center_L.Latitude;
            latEnd   = botRight_L.Latitude;

            longStart = topLeft_L.Longitude;
            longitude = center_L.Longitude;
            longEnd   = botRight_L.Longitude;
        }