ArcGIS engine 开发小小疑问 高分 20
privatevoidaxMapControl1_OnMouseDown(objectsender,IMapControlEvents2_OnMouseDownEvent...
private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
{
double x = e.mapX;
string t = Convert.ToString(x);
MessageBox.Show(t);
}
我就想知道 这里的 e.mapX 是返回的地图坐标么? 展开
{
double x = e.mapX;
string t = Convert.ToString(x);
MessageBox.Show(t);
}
我就想知道 这里的 e.mapX 是返回的地图坐标么? 展开
2个回答
展开全部
是的,返回的是mapcontrol控件的X坐标的值,并且单位是IMapControl::MapUnits.;
建议在学习AO二次开发的时候,勤查看帮助文档,推荐一款阅读离线帮助的利器——H3Viewer!
希望我的回答能够帮到你,祝学习进步!
建议在学习AO二次开发的时候,勤查看帮助文档,推荐一款阅读离线帮助的利器——H3Viewer!
希望我的回答能够帮到你,祝学习进步!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
上海华然企业咨询
2024-10-21 广告
2024-10-21 广告
上海华然企业咨询有限公司专注于AI与数据合规咨询服务。我们的核心团队来自头部互联网企业、红圈律所和专业安全服务机构。凭借深刻的AI产品理解、上百个AI产品的合规咨询和算法备案经验,为客户提供专业的算法备案、AI安全评估、数据出境等合规服务,...
点击进入详情页
本回答由上海华然企业咨询提供
展开全部
是的
x is the X coordinate, in pixels, where the mouse button was pressed
referenced against the origin (0, 0) of the MapControl (the top left hand
corner).
y is the Y coordinate, in pixels, where the mouse button
was pressed referenced against the origin (0, 0) of the MapControl (the top left
hand corner).
mapX is the X coordinate, in map units, where the mouse button was
pressed referenced against the origin (bottom left hand corner) of the IMapControl2::Map. The values returned are in IMapControl2::MapUnits.
mapY is the Y coordinate, in map units, where the mouse button was
pressed referenced against the origin (bottom left hand corner) of the IMapControl2::Map. The values returned are in IMapControl2::MapUnits
参数x,y为屏幕坐标,以像素为单位;
参数mapX,mapY为地图坐标,为实际地图单位。
两者可以进行相互转换(需要自定义函数,我记得老师讲过)。
x is the X coordinate, in pixels, where the mouse button was pressed
referenced against the origin (0, 0) of the MapControl (the top left hand
corner).
y is the Y coordinate, in pixels, where the mouse button
was pressed referenced against the origin (0, 0) of the MapControl (the top left
hand corner).
mapX is the X coordinate, in map units, where the mouse button was
pressed referenced against the origin (bottom left hand corner) of the IMapControl2::Map. The values returned are in IMapControl2::MapUnits.
mapY is the Y coordinate, in map units, where the mouse button was
pressed referenced against the origin (bottom left hand corner) of the IMapControl2::Map. The values returned are in IMapControl2::MapUnits
参数x,y为屏幕坐标,以像素为单位;
参数mapX,mapY为地图坐标,为实际地图单位。
两者可以进行相互转换(需要自定义函数,我记得老师讲过)。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询