Class MapSpan
MapSpan represents an area of the earth
Inherited Members
Namespace: Mapsui.UI.Maui
Assembly: Mapsui.UI.Maui.dll
Syntax
public class MapSpan
Constructors
| Edit this page View SourceMapSpan(Position, double, double)
Initializes a new instance of the MapSpan class.
Declaration
public MapSpan(Position center, double latitudeDegrees, double longitudeDegrees)
Parameters
Type | Name | Description |
---|---|---|
Position | center | Center of the MapSpan |
double | latitudeDegrees | Extend of MapSpan in latitude direction in degrees |
double | longitudeDegrees | Extend of MapSpan in longitude direction in degrees |
Properties
| Edit this page View SourceCenter
Center of MapSpan
Declaration
public Position Center { get; }
Property Value
Type | Description |
---|---|
Position | Center of MapSpan |
LatitudeDegrees
Extend of MapSpan in latitude degrees
Declaration
public double LatitudeDegrees { get; }
Property Value
Type | Description |
---|---|
double | Extend in latitude degrees |
LongitudeDegrees
Extend of MapSpan in longitude degrees
Declaration
public double LongitudeDegrees { get; }
Property Value
Type | Description |
---|---|
double | Extend in longitude degrees |
Radius
Radius of smallest circle thats fit into MapSpan
Declaration
public Distance Radius { get; }
Property Value
Type | Description |
---|---|
Distance | The radius. |
Methods
| Edit this page View SourceClampLatitude(double, double)
Clamp latitude between north and south
Declaration
public MapSpan ClampLatitude(double north, double south)
Parameters
Type | Name | Description |
---|---|---|
double | north | Maximal latitude degrees for north |
double | south | Maximal latitude degrees for south |
Returns
Type | Description |
---|---|
MapSpan | MapSpan with center clamped between north and south |
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Edit this page View SourceFromCenterAndRadius(Position, Distance)
Create a new MapSpan from center and radius
Declaration
public static MapSpan FromCenterAndRadius(Position center, Distance radius)
Parameters
Type | Name | Description |
---|---|---|
Position | center | Center for new MapSpan |
Distance | radius | Radius for new MapSpan |
Returns
Type | Description |
---|---|
MapSpan | New MapSpan |
FromPositions(IEnumerable<Position>)
Create a new MapSpan from multiple positions
Declaration
public static MapSpan FromPositions(IEnumerable<Position> positions)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Position> | positions | List of positions to get the new MapSpan |
Returns
Type | Description |
---|---|
MapSpan | New MapSpan |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
| Edit this page View SourceWithZoom(double)
Create a new MapSPan with given zoom factor
Declaration
public MapSpan WithZoom(double zoomFactor)
Parameters
Type | Name | Description |
---|---|---|
double | zoomFactor | Zoom factor |
Returns
Type | Description |
---|---|
MapSpan | New MapSpan |
Operators
| Edit this page View Sourceoperator ==(MapSpan, MapSpan)
Declaration
public static bool operator ==(MapSpan left, MapSpan right)
Parameters
Type | Name | Description |
---|---|---|
MapSpan | left | |
MapSpan | right |
Returns
Type | Description |
---|---|
bool |
operator !=(MapSpan, MapSpan)
Declaration
public static bool operator !=(MapSpan left, MapSpan right)
Parameters
Type | Name | Description |
---|---|---|
MapSpan | left | |
MapSpan | right |
Returns
Type | Description |
---|---|
bool |