void mainMapWin_MapMouseMove(object sender, DotSpatial.Controls.GeoMouseArgs e) { double[] xy = new double[] { e.GeographicLocation.X, e.GeographicLocation.Y }; double[] z = new double[] { 0 }; DotSpatial.Projections.Reproject.ReprojectPoints(xy, z, this.mainMap.MapFrame.Projection, this.webMap.GetProjection(), 0, 1); this.basemapWin.SetMousePosition(xy[0], xy[1]); }
void map_MouseMove(object sender, MouseEventArgs e) { DotSpatial.Controls.GeoMouseArgs args = new DotSpatial.Controls.GeoMouseArgs(e, this.map); //求X、Y轴坐标 string xpanel = String.Format("X: {0:0.00000}", args.GeographicLocation.X); string ypanel = String.Format("Y: {0:0.00000}", args.GeographicLocation.Y); this.lbPosition.Text = xpanel + " " + ypanel; }