Online Maps  v3
OnlineMapsDrawingElement Class Reference

Class implements the basic functionality of drawing on the map. More...

Inheritance diagram for OnlineMapsDrawingElement:
IOnlineMapsInteractiveElement OnlineMapsDrawingLine OnlineMapsDrawingPoly OnlineMapsDrawingRect

Public Member Functions

void Dispose ()
 Dispose drawing element. More...
 
virtual void Draw (Color32[] buffer, Vector2 bufferPosition, int bufferWidth, int bufferHeight, float zoom, bool invertY=false)
 Draw element on the map. More...
 
virtual void DrawOnTileset (OnlineMapsTileSetControl control, int index)
 Draws element on a specified TilesetControl. More...
 
virtual bool HitTest (Vector2 positionLngLat, int zoom)
 Determines if the drawing element at the specified coordinates. More...
 

Static Public Member Functions

static void MarkChanged ()
 It marks the elements changed.
It is used for the Drawing API as an overlay. More...
 

Public Attributes

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...
 
float yOffset = 0
 The local Y position for the GameObject on Tileset. More...
 

Static Public Attributes

static Action< OnlineMapsDrawingElementOnElementDrawTooltip
 Default event caused to draw tooltip. More...
 

Properties

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...
 

Detailed Description

Class implements the basic functionality of drawing on the map.

Member Function Documentation

◆ Dispose()

void OnlineMapsDrawingElement.Dispose ( )

Dispose drawing element.

Implements IOnlineMapsInteractiveElement.

◆ Draw()

virtual void OnlineMapsDrawingElement.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 in OnlineMapsDrawingRect, OnlineMapsDrawingPoly, and OnlineMapsDrawingLine.

◆ DrawOnTileset()

virtual void OnlineMapsDrawingElement.DrawOnTileset ( OnlineMapsTileSetControl  control,
int  index 
)
virtual

Draws element on a specified TilesetControl.

Parameters
controlReference to tileset control.
indexIndex of drawing element

Reimplemented in OnlineMapsDrawingRect, OnlineMapsDrawingPoly, and OnlineMapsDrawingLine.

◆ HitTest()

virtual bool OnlineMapsDrawingElement.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 in OnlineMapsDrawingRect, OnlineMapsDrawingPoly, and OnlineMapsDrawingLine.

◆ MarkChanged()

static void OnlineMapsDrawingElement.MarkChanged ( )
static

It marks the elements changed.
It is used for the Drawing API as an overlay.

Member Data Documentation

◆ checkMapBoundaries

bool OnlineMapsDrawingElement.checkMapBoundaries = true

Need to check the map boundaries?
It allows you to make drawing element, which are active outside the map.

◆ OnClick

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnClick

Events that occur when user click on the drawing element.

◆ OnDoubleClick

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnDoubleClick

Events that occur when user double click on the drawing element.

◆ OnDrawTooltip

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnDrawTooltip

Event caused to draw tooltip.

◆ OnElementDrawTooltip

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnElementDrawTooltip
static

Default event caused to draw tooltip.

◆ OnInitMesh

Action<OnlineMapsDrawingElement, Renderer> OnlineMapsDrawingElement.OnInitMesh

Event that occur when tileset initializes a mesh.

◆ OnLongPress

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnLongPress

Events that occur when user long press on the drawing element.

◆ OnPress

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnPress

Events that occur when user press on the drawing element.

◆ OnRelease

Action<OnlineMapsDrawingElement> OnlineMapsDrawingElement.OnRelease

Events that occur when user release on the drawing element.

◆ range

OnlineMapsRange OnlineMapsDrawingElement.range

Zoom range, in which the drawing element will be displayed.

◆ tooltip

string OnlineMapsDrawingElement.tooltip

Tooltip that is displayed when user hover on the drawing element.

◆ yOffset

float OnlineMapsDrawingElement.yOffset = 0

The local Y position for the GameObject on Tileset.

Property Documentation

◆ center

virtual OnlineMapsVector2d OnlineMapsDrawingElement.center
get

Center point of the drawing element.

◆ visible

virtual bool OnlineMapsDrawingElement.visible
getset

Gets or sets the visibility of the drawing element.