Online Maps  v3
OnlineMapsMarkerBase Class Reference

The base class for markers. More...

Inheritance diagram for OnlineMapsMarkerBase:
IOnlineMapsInteractiveElement OnlineMapsMarker OnlineMapsMarker3D

Public Member Functions

virtual void Dispose ()
 Disposes marker More...
 
Get< T > (string key)
 Gets the value from the customFields dictionary by key. More...
 
void GetPosition (out double lng, out double lat)
 Gets location of marker. More...
 
void GetTilePosition (out double px, out double py)
 Get tile position of the marker More...
 
void GetTilePosition (out double px, out double py, int zoom)
 Get tile position of the marker More...
 
void GetTilePosition (int zoom, out double px, out double py)
 Get tile position of the marker More...
 
bool InMapView ()
 Checks if the marker is in the current map view More...
 
virtual void LookToCoordinates (OnlineMapsVector2d coordinates)
 Turns the marker in the direction specified coordinates More...
 
void LookToCoordinates (double longitude, double latitude)
 Turns the marker in the direction specified coordinates More...
 
void SetPosition (double lng, double lat)
 Set location of marker More...
 
void SetDraggable (bool value=true)
 Makes the marker draggable or un draggable More...
 
virtual void Update ()
 Update of marker instance. More...
 
virtual void Update (double tlx, double tly, double brx, double bry, int zoom)
 Method that called when need update marker. More...
 

Public Attributes

Action< OnlineMapsMarkerBaseOnClick
 Events that occur when user click on the marker. More...
 
Action< OnlineMapsMarkerBaseOnDoubleClick
 Events that occur when user double click on the marker. More...
 
Action< OnlineMapsMarkerBaseOnDrag
 Events that occur when user drag the marker. More...
 
Action< OnlineMapsMarkerBaseOnDrawTooltip
 Event caused to draw tooltip. More...
 
Action< OnlineMapsMarkerBaseOnEnabledChange
 Event occurs when the marker enabled change. More...
 
Action< OnlineMapsMarkerBaseOnInitComplete
 Event occurs when the marker is initialized. More...
 
Action< OnlineMapsMarkerBaseOnLongPress
 Events that occur when user long press on the marker. More...
 
Action< OnlineMapsMarkerBaseOnPress
 Events that occur when user press on the marker. More...
 
Action< OnlineMapsMarkerBaseOnPositionChanged
 Event that occurs when the marker position changed. More...
 
Action< OnlineMapsMarkerBaseOnRelease
 Events that occur when user release on the marker. More...
 
Action< OnlineMapsMarkerBaseOnRollOut
 Events that occur when user roll out marker. More...
 
Action< OnlineMapsMarkerBaseOnRollOver
 Events that occur when user roll over marker. More...
 
string label = ""
 Marker label. More...
 
OnlineMapsRange range
 Zoom range, in which the marker will be displayed. More...
 
List< string > tags
 List of tags. More...
 

Static Public Attributes

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

Properties

Dictionary< string, object > customFields [get]
 Get customFields dictionary. More...
 
virtual bool enabled [get, set]
 Gets or sets marker enabled. More...
 
bool isDraggable [get, set]
 Makes the marker draggable or un draggable More...
 
IOnlineMapsInteractiveElementManager? manager [get, set]
 Reference to Marker Manager More...
 
Vector2 position [get, set]
 Marker coordinates. More...
 
virtual float scale [get, set]
 Scale of marker. More...
 
virtual bool inMapView [get]
 Checks to display marker in current map view. More...
 
object? this[string key] [get, set]
 Get or set a value in the customFields dictionary by key. More...
 

Detailed Description

The base class for markers.

Member Function Documentation

◆ Dispose()

virtual void OnlineMapsMarkerBase.Dispose ( )
virtual

Disposes marker

Implements IOnlineMapsInteractiveElement.

◆ Get< T >()

T OnlineMapsMarkerBase.Get< T > ( string  key)

Gets the value from the customFields dictionary by key.

Parameters
keyField key.
Template Parameters
TType of value.
Returns
Field value.

◆ GetPosition()

void OnlineMapsMarkerBase.GetPosition ( out double  lng,
out double  lat 
)

Gets location of marker.

Parameters
lngLongitude
latLatitude

◆ GetTilePosition() [1/3]

void OnlineMapsMarkerBase.GetTilePosition ( int  zoom,
out double  px,
out double  py 
)

Get tile position of the marker

Parameters
zoomZoom
pxTile X
pyTile Y

◆ GetTilePosition() [2/3]

void OnlineMapsMarkerBase.GetTilePosition ( out double  px,
out double  py 
)

Get tile position of the marker

Parameters
pxTile X
pyTile Y

◆ GetTilePosition() [3/3]

void OnlineMapsMarkerBase.GetTilePosition ( out double  px,
out double  py,
int  zoom 
)

Get tile position of the marker

Parameters
pxTile X
pyTile Y
zoomZoom

◆ InMapView()

bool OnlineMapsMarkerBase.InMapView ( )

Checks if the marker is in the current map view

Returns
True - in map view. False - outside map view

◆ LookToCoordinates() [1/2]

void OnlineMapsMarkerBase.LookToCoordinates ( double  longitude,
double  latitude 
)

Turns the marker in the direction specified coordinates

Parameters
longitudeLongitude
latitudeLatitude

◆ LookToCoordinates() [2/2]

virtual void OnlineMapsMarkerBase.LookToCoordinates ( OnlineMapsVector2d  coordinates)
virtual

Turns the marker in the direction specified coordinates

Parameters
coordinatesThe coordinates

Reimplemented in OnlineMapsMarker3D, and OnlineMapsMarker.

◆ SetDraggable()

void OnlineMapsMarkerBase.SetDraggable ( bool  value = true)

Makes the marker draggable or un draggable

Parameters
valueTrue - set draggable, false - unset draggable

◆ SetPosition()

void OnlineMapsMarkerBase.SetPosition ( double  lng,
double  lat 
)

Set location of marker

Parameters
lngLongitude
latLatitude

◆ Update() [1/2]

virtual void OnlineMapsMarkerBase.Update ( )
virtual

Update of marker instance.

Reimplemented in OnlineMapsMarker3D.

◆ Update() [2/2]

virtual void OnlineMapsMarkerBase.Update ( double  tlx,
double  tly,
double  brx,
double  bry,
int  zoom 
)
virtual

Method that called when need update marker.

Parameters
tlxTop-left longitude.
tlyTop-left latutude.
brxBottom-right longitude.
bryBottom-right latitude.
zoomMap zoom.

Reimplemented in OnlineMapsMarker3D.

Member Data Documentation

◆ label

string OnlineMapsMarkerBase.label = ""

Marker label.

◆ OnClick

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnClick

Events that occur when user click on the marker.

◆ OnDoubleClick

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnDoubleClick

Events that occur when user double click on the marker.

◆ OnDrag

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnDrag

Events that occur when user drag the marker.

◆ OnDrawTooltip

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnDrawTooltip

Event caused to draw tooltip.

◆ OnEnabledChange

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnEnabledChange

Event occurs when the marker enabled change.

◆ OnInitComplete

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnInitComplete

Event occurs when the marker is initialized.

◆ OnLongPress

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnLongPress

Events that occur when user long press on the marker.

◆ OnMarkerDrawTooltip

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnMarkerDrawTooltip
static

Default event caused to draw tooltip.

◆ OnPositionChanged

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnPositionChanged

Event that occurs when the marker position changed.

◆ OnPress

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnPress

Events that occur when user press on the marker.

◆ OnRelease

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnRelease

Events that occur when user release on the marker.

◆ OnRollOut

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnRollOut

Events that occur when user roll out marker.

◆ OnRollOver

Action<OnlineMapsMarkerBase> OnlineMapsMarkerBase.OnRollOver

Events that occur when user roll over marker.

◆ range

OnlineMapsRange OnlineMapsMarkerBase.range

Zoom range, in which the marker will be displayed.

◆ tags

List<string> OnlineMapsMarkerBase.tags

List of tags.

Property Documentation

◆ customFields

Dictionary<string, object> OnlineMapsMarkerBase.customFields
get

Get customFields dictionary.

◆ enabled

virtual bool OnlineMapsMarkerBase.enabled
getset

Gets or sets marker enabled.

true if enabled, false if not.

◆ inMapView

virtual bool OnlineMapsMarkerBase.inMapView
get

Checks to display marker in current map view.

◆ isDraggable

bool OnlineMapsMarkerBase.isDraggable
getset

Makes the marker draggable or un draggable

◆ manager

IOnlineMapsInteractiveElementManager? OnlineMapsMarkerBase.manager
getset

Reference to Marker Manager

◆ position

Vector2 OnlineMapsMarkerBase.position
getset

Marker coordinates.

◆ scale

virtual float OnlineMapsMarkerBase.scale
getset

Scale of marker.

◆ this[string key]

object? OnlineMapsMarkerBase.this[string key]
getset

Get or set a value in the customFields dictionary by key.

Parameters
keyField key.
Returns
Field value.