Chinaunix首页 | 论坛 | 博客
  • 博客访问: 251634
  • 博文数量: 45
  • 博客积分: 170
  • 博客等级: 入伍新兵
  • 技术积分: 488
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-13 14:43
文章分类

全部博文(45)

文章存档

2014年(2)

2013年(35)

2012年(8)

我的朋友

分类: IT业界

2013-04-23 21:15:51

    控件坐标与相应地理坐标转换
    

点击(此处)折叠或打开

  1. private void axMap1_MouseMoveEvent(object sender, AxMapObjects2._DMapEvents_MouseMoveEvent e)
  2. {
  3.      
  4.      MapObjects2.Point p1 = axMap1.ToMapPoint(e.x, e.y);//
  5.      
  6.      textBox1.Text = p1.X.ToString("0.00000");//得到相应经度
  7.      textBox2.Text = p1.Y.ToString("0.00000");
  8.      float xx=0, yy=0;//根据经纬度得到图层平面坐标
  9.      axMap1.FromMapPoint(p1,ref xx, ref yy);
  10.                  
  11.  }


    
阅读(506) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~