Class GeographyUtils
- Namespace
- MapLibreNative.Maui.Geometry
Provides geography-related utility methods.
public static class GeographyUtils
- Inheritance
-
GeographyUtils
- Inherited Members
Methods
ToCircumferencePositions(MapCoordinate, Distance, int)
Calculates the circumference positions that approximate a circle on the map, given its center and radius. Useful for rendering a circle as a GeoJSON polygon ring.
public static List<MapCoordinate> ToCircumferencePositions(MapCoordinate center, Distance radius, int segments = 360)
Parameters
centerMapCoordinateThe center of the circle.
radiusDistanceThe radius of the circle.
segmentsintThe number of segments used to approximate the circle (default 360).
Returns
- List<MapCoordinate>
A closed ring of positions approximating the circle's circumference.
ToDegrees(double)
Converts radians to degrees.
public static double ToDegrees(this double radians)
Parameters
radiansdouble
Returns
ToRadians(double)
Converts degrees to radians.
public static double ToRadians(this double degrees)
Parameters
degreesdouble