LuciadCPillar C# 2023.1.04
Luciad.Maps.MapScale Struct Reference

This class represents a map scale, a ratio of a distance on the map to the corresponding actual distance. More...

Inheritance diagram for Luciad.Maps.MapScale:

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]
 
static MapScale MaxZoomedIn = new MapScale(Double.MaxValue) [get]
 
static MapScale MaxZoomedOut = new MapScale(0.0) [get]
 
double Value [get]
 

Detailed Description

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::getDpi) value of the screen on which it is rendered. See also the related article

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapScale.

Constructor & Destructor Documentation

◆ MapScale()

Luciad.Maps.MapScale.MapScale ( double  value)
inline

Creates a new MapScale based on the given ratio.

value

a value that represents 1 / denominator. For example: a MapScale of 1:50000 can be created using 0.00002 (=1/50000) as value.

luciad::InvalidArgumentException

when the map scale is smaller than 0.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapScale::MapScale.

Member Function Documentation

◆ Equals() [1/2]

bool Luciad.Maps.MapScale.Equals ( MapScale  other)
inline

◆ Equals() [2/2]

override bool Luciad.Maps.MapScale.Equals ( object  other)
inline

◆ FromDenominator()

Luciad.Maps.MapScale Luciad.Maps.MapScale.FromDenominator ( double  denominator)
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.

a map scale that corresponds to 1:denominator

luciad::InvalidArgumentException

when the denominator is negative.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapScale::fromDenominator.

◆ GetHashCode()

override int Luciad.Maps.MapScale.GetHashCode ( )
inline

◆ operator double()

static Luciad.Maps.MapScale.operator double ( MapScale  mapScale)
inlineexplicitstatic

◆ operator MapScale()

static implicit Luciad.Maps.MapScale.operator MapScale ( double  value)
inlinestatic

◆ operator!=()

static bool Luciad.Maps.MapScale.operator!= ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ operator<()

static bool Luciad.Maps.MapScale.operator< ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ operator<=()

static bool Luciad.Maps.MapScale.operator<= ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ operator==()

static bool Luciad.Maps.MapScale.operator== ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ operator>()

static bool Luciad.Maps.MapScale.operator> ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ operator>=()

static bool Luciad.Maps.MapScale.operator>= ( MapScale  lhs,
MapScale  rhs 
)
inlinestatic

◆ ToString()

override string Luciad.Maps.MapScale.ToString ( )
inline

◆ ZoomIn()

Luciad.Maps.MapScale Luciad.Maps.MapScale.ZoomIn ( double  factor)
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

a new map scale that is zoomed in using the given factor.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapScale::zoomIn.

◆ ZoomOut()

Luciad.Maps.MapScale Luciad.Maps.MapScale.ZoomOut ( double  factor)
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

a new map scale that is zoomed out using the given factor.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::MapScale::zoomOut.

Property Documentation

◆ Denominator

double Luciad.Maps.MapScale.Denominator
get

◆ MaxZoomedIn

MapScale Luciad.Maps.MapScale.MaxZoomedIn = new MapScale(Double.MaxValue)
staticget

◆ MaxZoomedOut

MapScale Luciad.Maps.MapScale.MaxZoomedOut = new MapScale(0.0)
staticget

◆ Value

double Luciad.Maps.MapScale.Value
get