Table of Contents

Struct MapCoordinate

A geographic coordinate (WGS84) used by the map primitives (MapSpan, Distance, GeographyUtils).

public readonly record struct MapCoordinate : IEquatable<MapCoordinate>
Implements
Inherited Members

Remarks

This is the UI-agnostic coordinate type for the shared primitives, so they can be consumed from both the WPF host and the MAUI handlers without depending on Microsoft.Maui.Devices.Sensors.Location. It interoperates with the (double Lat, double Lon) tuples used throughout the bindings via implicit conversions.

Constructors

MapCoordinate(double, double)

A geographic coordinate (WGS84) used by the map primitives (MapSpan, Distance, GeographyUtils).

public MapCoordinate(double Latitude, double Longitude)

Parameters

Latitude double
Longitude double

Remarks

This is the UI-agnostic coordinate type for the shared primitives, so they can be consumed from both the WPF host and the MAUI handlers without depending on Microsoft.Maui.Devices.Sensors.Location. It interoperates with the (double Lat, double Lon) tuples used throughout the bindings via implicit conversions.

Properties

Latitude

public double Latitude { get; init; }

Property Value

double

Longitude

public double Longitude { get; init; }

Property Value

double

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

implicit operator (double Lat, double Lon)(MapCoordinate)

Converts the coordinate to a (Lat, Lon) tuple.

public static implicit operator (double Lat, double Lon)(MapCoordinate c)

Parameters

c MapCoordinate

Returns

(double X, double Y)

implicit operator MapCoordinate((double Lat, double Lon))

Creates a coordinate from a (Lat, Lon) tuple.

public static implicit operator MapCoordinate((double Lat, double Lon) t)

Parameters

t (double X, double Y)

Returns

MapCoordinate