This document is archived and information here might be outdated.  Recommended version.


IGlobeDisplay.Locate Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > GlobeCore > ESRI.ArcGIS.GlobeCore > Interfaces > IG > IGlobeDisplay Interface > IGlobeDisplay.Locate Method
ArcGIS Developer Help

IGlobeDisplay.Locate Method

Find the object and location in the line of sight.

[Visual Basic .NET]
Public Sub Locate ( _
    ByVal pViewer As ISceneViewer, _
    ByVal xView As Integer, _
    ByVal yView As Integer, _
    ByVal bGetTransformed As Boolean, _
    ByVal bGetEmptyGlobe As Boolean, _
    ByRef ppPoint As IPoint, _
    ByRef ppOwner As Object, _
    ByRef ppObject As Object _
)
[C#]
public void Locate (
    ISceneViewer pViewer,
    int xView,
    int yView,
    bool bGetTransformed,
    bool bGetEmptyGlobe,
    ref IPoint ppPoint,
    ref object ppOwner,
    ref object ppObject
);
[C++]
HRESULT Locate(
  ISceneViewer* pViewer,
  long xView,
  long yView,
  VARIANT_BOOL bGetTransformed,
  VARIANT_BOOL bGetEmptyGlobe,
  IPoint** ppPoint,
  IUnknown Pointer* ppOwner,
  IUnknown Pointer* ppObject
);
[C++]
Parameters
pViewer [in]

pViewer is a parameter of type ISceneViewer* xView [in]
xView is a parameter of type long yView [in]
yView is a parameter of type long bGetTransformed [in]
bGetTransformed is a parameter of type bool bGetEmptyGlobe [in]
bGetEmptyGlobe is a parameter of type bool ppPoint [out]
ppPoint is a parameter of type IPoint** ppOwner [out]
ppOwner is a parameter of type IUnknown* ppObject [out]
ppObject is a parameter of type IUnknown*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

This method returns the closest object (ppObject) hit by the line of sight from the observer location in the window coordinates xView, yView in the viewer, pViewer.

ppPoint is a point representing the hit location coordinates.


If bGetTransformed is True, it indicates that the returned coordinates must be in the internal geocentric coordinate system. If bGetTransformed = False, the returned hit point coordinates are in the Globe Spatial Reference: longitude, latitude and altitude are in kilometers.


If bGetEmptyGlobe is True, a hit will be added for the base globe surface, even if it doesn't contain any layer.

See Also

IGlobeDisplay Interface

.NET Samples

Globe Fly tool