Method LocationToScreen
LocationToScreen(MapPoint)
Converts a location in map coordinates to a point in screen coordinates relative to the upper-left corner of the scene view.
Declaration
public Point LocationToScreen(MapPoint location)
Parameters
Type | Name | Description |
---|---|---|
MapPoint | location | A location defined within the spatial reference of the scene view. |
Returns
Type | Description |
---|---|
Microsoft.Maui.Graphics.Point | Screen location in this map control's local display coordinate system |
Remarks
The screen coordinates are in device-independent pixels (DIP) relative to the upper-left corner of the scene view at position 0,0. If you need a location relative to another visual element, use the TransformToVisual method to create a transformation between the map and another visual element.
To call this method, assign a scene to the scene view, ensure that it is loaded and the draw status is Completed.
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET | 200.0 - 200.6 |
.NET Windows | 200.0 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
LocationToScreen(MapPoint, out LocationVisibility)
Converts a location in map coordinates to a screen coordinate relative to the upper-left corner of the scene.
Declaration
public Point LocationToScreen(MapPoint location, out LocationVisibility visibility)
Parameters
Type | Name | Description |
---|---|---|
MapPoint | location | The location in world coordinates to convert to screen coordinate. |
LocationVisibility | visibility | The visibility of the point on the screen. |
Returns
Type | Description |
---|---|
Microsoft.Maui.Graphics.Point | Screen location in this scene view control's local display coordinate system |
Remarks
The screen location returned is relative to the upper left corner of the scene view control. If you need a location relative to another visual element, use the TransformToVisual method to create a transformation between the map and another visual element.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | location |
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET | 200.0 - 200.6 |
.NET Windows | 200.0 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |