|
LuciadCPillar C# 2025.0.07
|
This class represents a map scale, a ratio of a distance on the map to the corresponding actual distance. More...
Public Member Functions | |
| MapScale (double value) | |
Creates a new MapScale based on the given ratio. More... | |
| bool | Equals (MapScale other) |
| override bool | Equals (object other) |
| override int | GetHashCode () |
| override string | ToString () |
| MapScale | ZoomIn (double factor) |
| Creates a new MapScale which is zoomed in with a given factor. More... | |
| MapScale | ZoomOut (double factor) |
| Creates a new MapScale which is zoomed outn with a given factor. More... | |
Static Public Member Functions | |
| static MapScale | FromDenominator (double denominator) |
| Creates a map scale from a denominator value. More... | |
| static | operator double (MapScale mapScale) |
| static implicit | operator MapScale (double value) |
| static bool | operator!= (MapScale lhs, MapScale rhs) |
| static bool | operator< (MapScale lhs, MapScale rhs) |
| static bool | operator<= (MapScale lhs, MapScale rhs) |
| static bool | operator== (MapScale lhs, MapScale rhs) |
| static bool | operator> (MapScale lhs, MapScale rhs) |
| static bool | operator>= (MapScale lhs, MapScale rhs) |
Properties | |
| double | Denominator [get] |
| The denominator of this map scale. More... | |
| static MapScale | MaxZoomedIn = new MapScale(Double.MaxValue) [get] |
| The value that represents a maximally zoomed in map scale (1:0 ≈ the maximum double value) More... | |
| static MapScale | MaxZoomedOut = new MapScale(0.0) [get] |
| The value that represents a maximally zoomed out map scale (1:inf == 0) More... | |
| double | Value [get] |
| The scale value. More... | |
This class represents a map scale, a ratio of a distance on the map to the corresponding actual distance.
For example: a map scale of 1:50000 means that 1 centimeter on a map corresponds with 500 meters on the ground.
This class gives a natural ordering to map scales, from zoomed out to zoomed in. When a part of the API takes an ordered collection as input, it must be ordered according to this natural ordering (unless stated otherwise).
In order for a Map instance to interpret MapScale values correctly, it needs to know the DPI (see Map.Dpi) value of the screen on which it is rendered.
See also the related article
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Creates a map scale from a denominator value.
For example when using 1:50000 as map scale, the denominator is 50000.
| denominator | the scale denominator. |
| System.ArgumentException | when the denominator is negative. |
|
inline |
|
inlineexplicitstatic |
|
inlinestatic |
|
inline |
|
inline |
Creates a new MapScale which is zoomed in with a given factor.
For example, when applying this method on a 1:50000 scale, with a factor or 2, the resulting map scale will be 1:25000.
| factor | the factor using which to zoom in |
|
inline |
Creates a new MapScale which is zoomed outn with a given factor.
For example, when applying this method on a 1:50000 scale, with a factor or 2, the resulting map scale will be 1:100000.
| factor | the factor using which to zoom out |
|
get |
The denominator of this map scale.
Returns the denominator of this map scale. For example when the Map Scale is 1:50000, this method returns 50000.
The value that represents a maximally zoomed in map scale (1:0 ≈ the maximum double value)
The value that represents a maximally zoomed out map scale (1:inf == 0)
|
get |
The scale value.
Returns the scale value.