HitTestMap 方法

个人笔记,个人理解,仅供参考

IActiveView.HitTestMap Method

Returns any maps present in the view at the given location. Return value may be zero if there are no maps or the coordinate is not over a map.

返回显示在视图(View)中指定位置的地图(Map)。如果没有地图(maps)或者指定的位置不在地图上,返回值为0.

[C#]
public IMap HitTestMap (
    IPoint Location
);

Use this method on a PageLayout to find the nearest Map based on a point location.  For example, when ArcMap's identify tool is used in Layout view, the tool first finds the Map clicked on before it searches for features in the Map.

在视图中使用此方法根据指定的点寻找最近的地图。例如,当在布局视图中使用ArcMap identify工具,该工具首先找到点击位置的Map对象,然后在Map对象中搜索要素。

When using this method on a PageLayout, for the Location parameter, set up the Point in page coordinates. To convert from device coordinates to page coordinates:

当在pageLayout中使用该方法时,指定点须设置在视图坐标系中。将屏幕坐标转换为page坐标:

1.Get the ScreenDisplay from the PageLayout using IActiveView::ScreenDisplay.

2.Get the DisplayTransformation from the ScreenDisplay usingIScreenDisplay::DisplayTransformation.

3.Convert device coordinates (for example from a mouse move) to page coordinates usingIDisplayTransformation::ToMapPoint.

Use this method on a Map to obtain a reference to it through IMap.

 

转载于:https://www.cnblogs.com/DayDreamEveryWhere/archive/2012/06/10/2543868.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值