Online Maps  v3
OnlineMapsBuffer Class Reference

This class is responsible for drawing the map.
Please do not use it if you do not know what you're doing.
Perform all operations with the map through other classes. More...

Classes

struct  StateProps
 The main properties of the map More...
 

Public Member Functions

 OnlineMapsBuffer (OnlineMaps map)
 Constructor. More...
 
void ApplyTile (OnlineMapsTile tile)
 Adds a tile into the buffer. More...
 
void Dispose ()
 Dispose of buffer. More...
 
void GenerateFrontBuffer ()
 Generates the front buffer. More...
 
void GetCorners (out double tlx, out double tly, out double brx, out double bry)
 Get corners of the map. More...
 
void SetColorToBuffer (Color clr, OnlineMapsVector2i ip, int x, int y)
 Sets the color to the buffer. More...
 
void UnloadOldTiles ()
 Unload old tiles. More...
 
void UnloadOldTypes ()
 Unload old types of tiles. More...
 

Public Attributes

bool allowUnloadTiles = true
 Indicates that the buffer can unload tiles. More...
 
OnlineMaps map
 Reference to OnlineMaps. More...
 
OnlineMapsVector2i bufferPosition
 Position the tile, which begins buffer. More...
 
Color32[] frontBuffer
 Front buffer. More...
 
OnlineMapsVector2i frontBufferPosition
 Position the tile, which begins front buffer. More...
 
int height
 Height of the buffer. More...
 
bool needUnloadTiles
 Indicates that the buffer should unload tiles. More...
 
OnlineMapsBufferStatus status = OnlineMapsBufferStatus.wait
 The current status of the buffer. More...
 
int width
 Width of the buffer. More...
 
StateProps lastState
 The last state of the map. More...
 
StateProps renderState
 The current state of the map. More...
 

Properties

Vector2 topLeftPosition [get]
 The coordinates of the top-left the point of map that displays. More...
 

Detailed Description

This class is responsible for drawing the map.
Please do not use it if you do not know what you're doing.
Perform all operations with the map through other classes.

Constructor & Destructor Documentation

◆ OnlineMapsBuffer()

OnlineMapsBuffer.OnlineMapsBuffer ( OnlineMaps  map)

Constructor.

Parameters
mapMap

Member Function Documentation

◆ ApplyTile()

void OnlineMapsBuffer.ApplyTile ( OnlineMapsTile  tile)

Adds a tile into the buffer.

Parameters
tileTile

◆ Dispose()

void OnlineMapsBuffer.Dispose ( )

Dispose of buffer.

◆ GenerateFrontBuffer()

void OnlineMapsBuffer.GenerateFrontBuffer ( )

Generates the front buffer.

◆ GetCorners()

void OnlineMapsBuffer.GetCorners ( out double  tlx,
out double  tly,
out double  brx,
out double  bry 
)

Get corners of the map.

Parameters
tlxTop left longitude
tlyTop left latitude
brxBottom right longitude
bryBottom right latitude

◆ SetColorToBuffer()

void OnlineMapsBuffer.SetColorToBuffer ( Color  clr,
OnlineMapsVector2i  ip,
int  x,
int  y 
)

Sets the color to the buffer.

Parameters
clrColor
ipTile position
xPixel X
yPixel Y

◆ UnloadOldTiles()

void OnlineMapsBuffer.UnloadOldTiles ( )

Unload old tiles.

◆ UnloadOldTypes()

void OnlineMapsBuffer.UnloadOldTypes ( )

Unload old types of tiles.

Member Data Documentation

◆ allowUnloadTiles

bool OnlineMapsBuffer.allowUnloadTiles = true

Indicates that the buffer can unload tiles.

◆ bufferPosition

OnlineMapsVector2i OnlineMapsBuffer.bufferPosition

Position the tile, which begins buffer.

◆ frontBuffer

Color32 [] OnlineMapsBuffer.frontBuffer

Front buffer.

◆ frontBufferPosition

OnlineMapsVector2i OnlineMapsBuffer.frontBufferPosition

Position the tile, which begins front buffer.

◆ height

int OnlineMapsBuffer.height

Height of the buffer.

◆ lastState

StateProps OnlineMapsBuffer.lastState

The last state of the map.

◆ map

OnlineMaps OnlineMapsBuffer.map

Reference to OnlineMaps.

◆ needUnloadTiles

bool OnlineMapsBuffer.needUnloadTiles

Indicates that the buffer should unload tiles.

◆ renderState

StateProps OnlineMapsBuffer.renderState

The current state of the map.

◆ status

OnlineMapsBufferStatus OnlineMapsBuffer.status = OnlineMapsBufferStatus.wait

The current status of the buffer.

◆ width

int OnlineMapsBuffer.width

Width of the buffer.

Property Documentation

◆ topLeftPosition

Vector2 OnlineMapsBuffer.topLeftPosition
get

The coordinates of the top-left the point of map that displays.