Online Maps  v3
OnlineMapsPositionRange Class Reference

Class limiting the coordinates of the map. More...

Public Member Functions

 OnlineMapsPositionRange (float minLat, float minLng, float maxLat, float maxLng, OnlineMapsPositionRangeType type=OnlineMapsPositionRangeType.center)
 Constructor. More...
 
Vector2 CheckAndFix (Vector2 position)
 Checks and limits geographic coordinates. More...
 
bool CheckAndFix (ref double lng, ref double lat)
 Checks and limits geographic coordinates. More...
 
bool InRange (Vector2 position)
 Checks whether the specified geographic coordinates in the range. More...
 

Public Attributes

float minLat = -90
 Minimum latitude value More...
 
float minLng = -180
 Minimum longitude value More...
 
float maxLat = 90
 Maximum latitude value More...
 
float maxLng = 180
 Maximum longitude value More...
 
OnlineMapsPositionRangeType type = OnlineMapsPositionRangeType.center
 Type of limitation position map. More...
 

Properties

Vector2 center [get]
 Center of range. More...
 

Detailed Description

Class limiting the coordinates of the map.

Constructor & Destructor Documentation

◆ OnlineMapsPositionRange()

OnlineMapsPositionRange.OnlineMapsPositionRange ( float  minLat,
float  minLng,
float  maxLat,
float  maxLng,
OnlineMapsPositionRangeType  type = OnlineMapsPositionRangeType.center 
)

Constructor.

Parameters
minLatMinimum latitude value
minLngMinimum longitude value
maxLatMaximum latitude value
maxLngMaximum longitude value
typeType of position lock

Member Function Documentation

◆ CheckAndFix() [1/2]

bool OnlineMapsPositionRange.CheckAndFix ( ref double  lng,
ref double  lat 
)

Checks and limits geographic coordinates.

Parameters
lngLongitude
latLatitude
Returns
True - coordinate changed, False - in other cases.

◆ CheckAndFix() [2/2]

Vector2 OnlineMapsPositionRange.CheckAndFix ( Vector2  position)

Checks and limits geographic coordinates.

Parameters
positionGeographic coordinates
Returns
Geographical coordinates corresponding to the specified range.

◆ InRange()

bool OnlineMapsPositionRange.InRange ( Vector2  position)

Checks whether the specified geographic coordinates in the range.

Parameters
positionGeographic coordinates
Returns
True - coordinates are in the range, False - in other cases.

Member Data Documentation

◆ maxLat

float OnlineMapsPositionRange.maxLat = 90

Maximum latitude value

◆ maxLng

float OnlineMapsPositionRange.maxLng = 180

Maximum longitude value

◆ minLat

float OnlineMapsPositionRange.minLat = -90

Minimum latitude value

◆ minLng

float OnlineMapsPositionRange.minLng = -180

Minimum longitude value

◆ type

OnlineMapsPositionRangeType OnlineMapsPositionRange.type = OnlineMapsPositionRangeType.center

Type of limitation position map.

Property Documentation

◆ center

Vector2 OnlineMapsPositionRange.center
get

Center of range.