Location Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Location() |
Initializes a new instance of the Location class. |
Location(Location) |
Initializes a new instance of the Location class from an existing instance. |
Location(Double, Double) |
Initializes a new instance of the Location class with the specified latitude and longitude. |
Location(Double, Double, DateTimeOffset) |
Initializes a new instance of the Location class with the specified latitude, longitude, and timestamp. |
Location(Double, Double, Double) |
Initializes a new instance of the Location class with the specified latitude, longitude, and altitude. |
Location()
- Source:
- Location.shared.cs
- Source:
- Location.shared.cs
Initializes a new instance of the Location class.
public:
Location();
public Location ();
Public Sub New ()
Applies to
Location(Location)
- Source:
- Location.shared.cs
- Source:
- Location.shared.cs
Initializes a new instance of the Location class from an existing instance.
public:
Location(Microsoft::Maui::Devices::Sensors::Location ^ point);
public Location (Microsoft.Maui.Devices.Sensors.Location point);
new Microsoft.Maui.Devices.Sensors.Location : Microsoft.Maui.Devices.Sensors.Location -> Microsoft.Maui.Devices.Sensors.Location
Public Sub New (point As Location)
Parameters
Exceptions
Thrown if point
is null
.
Applies to
Location(Double, Double)
- Source:
- Location.shared.cs
- Source:
- Location.shared.cs
Initializes a new instance of the Location class with the specified latitude and longitude.
public:
Location(double latitude, double longitude);
public Location (double latitude, double longitude);
new Microsoft.Maui.Devices.Sensors.Location : double * double -> Microsoft.Maui.Devices.Sensors.Location
Public Sub New (latitude As Double, longitude As Double)
Parameters
- latitude
- Double
Latitude in degrees. Must be in the interval [-90, 90].
- longitude
- Double
Longitude in degrees. Will be projected to the interval (-180, 180].
Applies to
Location(Double, Double, DateTimeOffset)
- Source:
- Location.shared.cs
- Source:
- Location.shared.cs
Initializes a new instance of the Location class with the specified latitude, longitude, and timestamp.
public:
Location(double latitude, double longitude, DateTimeOffset timestamp);
public Location (double latitude, double longitude, DateTimeOffset timestamp);
new Microsoft.Maui.Devices.Sensors.Location : double * double * DateTimeOffset -> Microsoft.Maui.Devices.Sensors.Location
Public Sub New (latitude As Double, longitude As Double, timestamp As DateTimeOffset)
Parameters
- latitude
- Double
Latitude in degrees. Must be in the interval [-90, 90].
- longitude
- Double
Longitude in degrees. Will be projected to the interval (-180, 180].
- timestamp
- DateTimeOffset
UTC timestamp for the location.
Applies to
Location(Double, Double, Double)
- Source:
- Location.shared.cs
- Source:
- Location.shared.cs
Initializes a new instance of the Location class with the specified latitude, longitude, and altitude.
public:
Location(double latitude, double longitude, double altitude);
public Location (double latitude, double longitude, double altitude);
new Microsoft.Maui.Devices.Sensors.Location : double * double * double -> Microsoft.Maui.Devices.Sensors.Location
Public Sub New (latitude As Double, longitude As Double, altitude As Double)
Parameters
- latitude
- Double
Latitude in degrees. Must be in the interval [-90, 90].
- longitude
- Double
Longitude in degrees. Will be projected to the interval (-180, 180].
- altitude
- Double
Altitude in meters.