Class MyLocationLayer
A layer to display a symbol for own location
Inheritance
Namespace: Mapsui.UI.Objects
Assembly: Mapsui.UI.Forms.dll
Syntax
public class MyLocationLayer : MemoryLayer
Remarks
There are two different symbols for own loaction: one is used when there isn't a change in position (still), and one is used, if the position changes (moving).
Constructors
| Improve this Doc View SourceMyLocationLayer(MapView)
Initializes a new instance of the MyLocationLayer class.
Declaration
public MyLocationLayer(MapView view)
Parameters
Type | Name | Description |
---|---|---|
MapView | view | MapView, to which this layer belongs |
MyLocationLayer(MapView, Position)
Initializes a new instance of the MyLocationLayer class with a starting location.
Declaration
public MyLocationLayer(MapView view, Position position)
Parameters
Type | Name | Description |
---|---|---|
MapView | view | MapView, to which this layer belongs |
Position | position | Position, where to start |
Properties
| Improve this Doc View SourceDirection
Movement direction of device at location
Declaration
public double Direction { get; }
Property Value
Type | Description |
---|---|
System.Double | Direction at location |
IsMoving
Should be moving arrow or round circle displayed
Declaration
public bool IsMoving { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MyLocation
Position of location, that is displayed
Declaration
public Position MyLocation { get; }
Property Value
Type | Description |
---|---|
Position | Position of location |
Scale
Scale of symbol
Declaration
public double Scale { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Scale of symbol |
ViewingDirection
Viewing direction of device (in degrees wrt. north direction)
Declaration
public double ViewingDirection { get; }
Property Value
Type | Description |
---|---|
System.Double | Direction at location |
Methods
| Improve this Doc View SourceUpdateMyDirection(Double, Double, Boolean)
Updates my movement direction
Declaration
public void UpdateMyDirection(double newDirection, double newViewportRotation, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
System.Double | newDirection | New direction |
System.Double | newViewportRotation | New viewport rotation |
System.Boolean | animated |
UpdateMyLocation(Position, Boolean)
Updates my location
Declaration
public void UpdateMyLocation(Position newLocation, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
Position | newLocation | New location |
System.Boolean | animated |
UpdateMySpeed(Double)
Updates my speed
Declaration
public void UpdateMySpeed(double newSpeed)
Parameters
Type | Name | Description |
---|---|---|
System.Double | newSpeed | New speed |
UpdateMyViewDirection(Double, Double, Boolean)
Updates my view direction
Declaration
public void UpdateMyViewDirection(double newDirection, double newViewportRotation, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
System.Double | newDirection | New direction |
System.Double | newViewportRotation | New viewport rotation |
System.Boolean | animated |