Class MapSpan
MapSpan represents an area of the earth
Inheritance
Inherited Members
Namespace: Mapsui.UI.Forms
Assembly: Mapsui.UI.Forms.dll
Syntax
public class MapSpan
Constructors
| Improve this Doc 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 |
System.Double | latitudeDegrees | Extend of MapSpan in latitude direction in degrees |
System.Double | longitudeDegrees | Extend of MapSpan in longitude direction in degrees |
Properties
| Improve this Doc 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 |
---|---|
System.Double | Extend in latitude degrees |
LongitudeDegrees
Extend of MapSpan in longitude degrees
Declaration
public double LongitudeDegrees { get; }
Property Value
Type | Description |
---|---|
System.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
| Improve this Doc View SourceClampLatitude(Double, Double)
Clamp latitude between north and south
Declaration
public MapSpan ClampLatitude(double north, double south)
Parameters
Type | Name | Description |
---|---|---|
System.Double | north | Maximal latitude degrees for north |
System.Double | south | Maximal latitude degrees for south |
Returns
Type | Description |
---|---|
MapSpan | MapSpan with center clamped between north and south |
Equals(Object)
Determines whether the specified System.Object is equal to the current MapSpan
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with current MapSpan |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
FromCenterAndRadius(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 |
---|---|---|
System.Collections.Generic.IEnumerable<Position> | positions | List of positions to get the new MapSpan |
Returns
Type | Description |
---|---|
MapSpan | New MapSpan |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
WithZoom(Double)
Create a new MapSPan with given zoom factor
Declaration
public MapSpan WithZoom(double zoomFactor)
Parameters
Type | Name | Description |
---|---|---|
System.Double | zoomFactor | Zoom factor |
Returns
Type | Description |
---|---|
MapSpan | New MapSpan |
Operators
| Improve this Doc View SourceEquality(MapSpan, MapSpan)
Declaration
public static bool operator ==(MapSpan left, MapSpan right)
Parameters
Type | Name | Description |
---|---|---|
MapSpan | left | |
MapSpan | right |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(MapSpan, MapSpan)
Declaration
public static bool operator !=(MapSpan left, MapSpan right)
Parameters
Type | Name | Description |
---|---|---|
MapSpan | left | |
MapSpan | right |
Returns
Type | Description |
---|---|
System.Boolean |