Online Maps  v3
OnlineMapsDrawingLine Class Reference

Class that draws a line on the map. More...

Inheritance diagram for OnlineMapsDrawingLine:
OnlineMapsDrawingElement IOnlineMapsInteractiveElement

Public Member Functions

 OnlineMapsDrawingLine ()
 Creates a new line. More...
 
 OnlineMapsDrawingLine (IEnumerable points)
 Creates a new line. More...
 
 OnlineMapsDrawingLine (IEnumerable points, Color color)
 Creates a new line. More...
 
 OnlineMapsDrawingLine (IEnumerable points, Color color, float width)
 Creates a new line. More...
 
override void Draw (Color32[] buffer, Vector2 bufferPosition, int bufferWidth, int bufferHeight, float zoom, bool invertY=false)
 Draw element on the map. More...
 
override void DrawOnTileset (OnlineMapsTileSetControl control, int index)
 Draws element on a specified TilesetControl. More...
 
override bool HitTest (Vector2 positionLngLat, int zoom)
 Determines if the drawing element at the specified coordinates. More...
 
- Public Member Functions inherited from OnlineMapsDrawingElement
void Dispose ()
 Dispose drawing element. More...
 

Properties

Color color [get, set]
 Color of the line. More...
 
Texture2D texture [get, set]
 Texture of line.
Uses only in tileset. More...
 
IEnumerable points [get, set]
 IEnumerable of points of the line. Geographic coordinates.
Can be:
IEnumerable<Vector2>, where X - longitide, Y - latitude,
IEnumerable<float> or IEnumerable<double>, where values (lng, lat, lng, lat... etc). More...
 
float width [get, set]
 Width of the line. More...
 
- Properties inherited from OnlineMapsDrawingElement
virtual OnlineMapsVector2d center [get]
 Center point of the drawing element. More...
 
virtual bool visible [get, set]
 Gets or sets the visibility of the drawing element. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from OnlineMapsDrawingElement
static void MarkChanged ()
 It marks the elements changed.
It is used for the Drawing API as an overlay. More...
 
- Public Attributes inherited from OnlineMapsDrawingElement
Action< OnlineMapsDrawingElementOnClick
 Events that occur when user click on the drawing element. More...
 
Action< OnlineMapsDrawingElementOnDoubleClick
 Events that occur when user double click on the drawing element. More...
 
Action< OnlineMapsDrawingElementOnDrawTooltip
 Event caused to draw tooltip. More...
 
Action< OnlineMapsDrawingElement, Renderer > OnInitMesh
 Event that occur when tileset initializes a mesh. More...
 
Action< OnlineMapsDrawingElementOnLongPress
 Events that occur when user long press on the drawing element. More...
 
Action< OnlineMapsDrawingElementOnPress
 Events that occur when user press on the drawing element. More...
 
Action< OnlineMapsDrawingElementOnRelease
 Events that occur when user release on the drawing element. More...
 
bool checkMapBoundaries = true
 Need to check the map boundaries?
It allows you to make drawing element, which are active outside the map.
More...
 
OnlineMapsRange range
 Zoom range, in which the drawing element will be displayed. More...
 
string tooltip
 Tooltip that is displayed when user hover on the drawing element. More...
 
- Static Public Attributes inherited from OnlineMapsDrawingElement
static Action< OnlineMapsDrawingElementOnElementDrawTooltip
 Default event caused to draw tooltip. More...
 

Detailed Description

Class that draws a line on the map.

Constructor & Destructor Documentation

◆ OnlineMapsDrawingLine() [1/4]

OnlineMapsDrawingLine.OnlineMapsDrawingLine ( )

Creates a new line.

◆ OnlineMapsDrawingLine() [2/4]

OnlineMapsDrawingLine.OnlineMapsDrawingLine ( IEnumerable  points)

Creates a new line.

Parameters
pointsIEnumerable of points of the line. Geographic coordinates.
The values can be of type: Vector2, float, double.
If values float or double, the value should go in pairs(longitude, latitude).

◆ OnlineMapsDrawingLine() [3/4]

OnlineMapsDrawingLine.OnlineMapsDrawingLine ( IEnumerable  points,
Color  color 
)

Creates a new line.

Parameters
pointsIEnumerable of points of the line. Geographic coordinates.
The values can be of type: Vector2, float, double.
If values float or double, the value should go in pairs(longitude, latitude).
colorColor of the line.

◆ OnlineMapsDrawingLine() [4/4]

OnlineMapsDrawingLine.OnlineMapsDrawingLine ( IEnumerable  points,
Color  color,
float  width 
)

Creates a new line.

Parameters
pointsIEnumerable of points of the line. Geographic coordinates. The values can be of type: Vector2, float, double.
If values float or double, the value should go in pairs(longitude, latitude).
colorColor of the line.
widthWidth of the line.

Member Function Documentation

◆ Draw()

override void OnlineMapsDrawingLine.Draw ( Color32 []  buffer,
Vector2  bufferPosition,
int  bufferWidth,
int  bufferHeight,
float  zoom,
bool  invertY = false 
)
virtual

Draw element on the map.

Parameters
bufferBackbuffer
bufferPositionBackbuffer position
bufferWidthBackbuffer width
bufferHeightBackbuffer height
zoomZoom of the map
invertYInvert Y direction

Reimplemented from OnlineMapsDrawingElement.

◆ DrawOnTileset()

override void OnlineMapsDrawingLine.DrawOnTileset ( OnlineMapsTileSetControl  control,
int  index 
)
virtual

Draws element on a specified TilesetControl.

Parameters
controlReference to tileset control.
indexIndex of drawing element

Reimplemented from OnlineMapsDrawingElement.

◆ HitTest()

override bool OnlineMapsDrawingLine.HitTest ( Vector2  positionLngLat,
int  zoom 
)
virtual

Determines if the drawing element at the specified coordinates.

Parameters
positionLngLatPosition.
zoomThe zoom.
Returns
True if the drawing element in position, false if not.

Reimplemented from OnlineMapsDrawingElement.

Property Documentation

◆ color

Color OnlineMapsDrawingLine.color
getset

Color of the line.

◆ points

IEnumerable OnlineMapsDrawingLine.points
getset

IEnumerable of points of the line. Geographic coordinates.
Can be:
IEnumerable<Vector2>, where X - longitide, Y - latitude,
IEnumerable<float> or IEnumerable<double>, where values (lng, lat, lng, lat... etc).

◆ texture

Texture2D OnlineMapsDrawingLine.texture
getset

Texture of line.
Uses only in tileset.

◆ width

float OnlineMapsDrawingLine.width
getset

Width of the line.