Method ScreenToLocationAsync
ScreenToLocationAsync(Point)
Converts a screen coordinate to a location in scene coordinates, considering both the scene's base surface and other scene content.
Declaration
public Task<MapPoint?> ScreenToLocationAsync(Point screenPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | screenPoint | The screen coordinate, in pixels. The coordinate of the top left corner of the screen is 0,0. |
Returns
| Type | Description |
|---|---|
| Task<MapPoint> | A MapPoint on the scene. The task result may be |
Remarks
Note that elevation values are approximated, and as the distance between the camera and the surface increases, the precision of the elevation value decreases.
To call this method, assign a scene to the scene view, ensure that it is loaded and the draw status is Completed.
This method checks for intersection between the input screen point and visible 3D features on the Scene.
It returns a point with X, Y and Z values matching the intersection point. If the input point does not
intersect a visible 3D feature, the Scene Surface
is used to retrieve the point values. If the input point does not intersect the Scene Surface or
any visible 3D features a null value is returned.
This method differs from ScreenToBaseSurface(Point) in that the latter only uses the Scene Surface and ignores visible 3D features. The algorithm is inherently slower than ScreenToBaseSurface and is therefore an async operation.
See Also
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Windows | 100.13 - 300.0 |
| .NET Framework | 100.0 - 200.8 |