![]() |
This document is archived and information here might be outdated. Recommended version. |
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.
[Visual Basic .NET] Public Function HitTestMap ( _ ByVal Location As IPoint _ ) As IMap
[C#] public IMap HitTestMap ( IPoint Location );
[C++]
HRESULT HitTestMap(
IPoint* Location
);
[C++] Parameters Location [in]
Location is a parameter of type IPoint*
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.
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:
Use this method on a Map to obtain a reference to it through IMap.