Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsDrawingElement Class Referenceabstract

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

Inheritance diagram for OnlineMapsDrawingElement:
IOnlineMapsInteractiveElement OnlineMapsDrawingLine OnlineMapsDrawingPoly OnlineMapsDrawingRect

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

Action< OnlineMapsDrawingElementOnClick
 Events that occur when user click on the drawing element.
 
Action< OnlineMapsDrawingElementOnDoubleClick
 Events that occur when user double click on the drawing element.
 
Action< OnlineMapsDrawingElementOnDrawTooltip
 Event caused to draw tooltip.
 
Action< OnlineMapsDrawingElement, Renderer > OnInitMesh
 Event that occur when tileset initializes a mesh.
 
Action< OnlineMapsDrawingElementOnLongPress
 Events that occur when user long press on the drawing element.
 
Action< OnlineMapsDrawingElementOnPress
 Events that occur when user press on the drawing element.
 
Action< OnlineMapsDrawingElementOnRelease
 Events that occur when user release on the drawing element.
 
bool checkMapBoundaries = true
 Need to check the map boundaries?
It allows you to make drawing element, which are active outside the map.

 
OnlineMapsRange range
 Zoom range, in which the drawing element will be displayed.
 
string tooltip
 Tooltip that is displayed when user hover on the drawing element.
 
float yOffset = 0
 The local Y position for the GameObject on Tileset.
 

Static Public Attributes

static Action< OnlineMapsDrawingElementOnElementDrawTooltip
 Default event caused to draw tooltip.
 

Properties

object this[string key] [get, set]
 Gets or sets custom data by key.
 
virtual bool active [get, set]
 Gets or sets the active state of the drawing element GameObject.
 
bool createBackgroundMaterial [get]
 Creates a background material for the drawing element.
 
Dictionary< string, object > customFields [get]
 Gets custom fields.
 
virtual OnlineMapsVector2d center [get]
 Center point of the drawing element.
 
virtual string defaultName [get]
 Default name of the drawing element.
 
OnlineMapsElevationManagerBase elevationManager [get]
 Gets the elevation manager.
 
bool hasElevation [get]
 Checks if the elevation is used.
 
GameObject instance [get]
 Instance of the drawing element.
 
IOnlineMapsInteractiveElementManager manager [get, set]
 Reference to DrawingElementManager.
 
string name [get, set]
 Gets or sets the name of the drawing element.
 
int renderQueueOffset [get, set]
 Gets or sets the render queue offset.
 
virtual bool splitToPieces [get]
 Should the drawing element be split into pieces?
 
virtual bool visible [get, set]
 Gets or sets the visibility of the drawing element.
 

Detailed Description

Class implements the basic functionality of drawing on the map.

Member Function Documentation

◆ 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 OnlineMapsDrawingLine, OnlineMapsDrawingPoly, and OnlineMapsDrawingRect.

◆ 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 OnlineMapsDrawingLine, OnlineMapsDrawingPoly, and OnlineMapsDrawingRect.

◆ 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 OnlineMapsDrawingLine, OnlineMapsDrawingPoly, and OnlineMapsDrawingRect.

◆ Validate()

virtual bool OnlineMapsDrawingElement.Validate ( )
virtual

Validate drawing element.

Returns
The result of validation.

Reimplemented in OnlineMapsDrawingLine, OnlineMapsDrawingPoly, and OnlineMapsDrawingRect.

Property Documentation

◆ this[string key]

object OnlineMapsDrawingElement.this[string key]
getset

Gets or sets custom data by key.

Parameters
keyKey