Online Maps  v3
OnlineMapsMarker3D Class Reference

3D marker class.
Can be used only when the source display - Texture or Tileset. More...

Inheritance diagram for OnlineMapsMarker3D:
OnlineMapsMarkerBase IOnlineMapsInteractiveElement

Public Types

enum  SizeType { SizeType.scene, SizeType.realWorld, SizeType.meters }
 Type of 3d marker size More...
 

Public Member Functions

 OnlineMapsMarker3D ()
 Constructor of 3D marker More...
 
 OnlineMapsMarker3D (GameObject instance)
 Create 3D marker from an existing GameObject. More...
 
void Init (Transform parent)
 Initializes this object. More...
 
override void LookToCoordinates (OnlineMapsVector2d coordinates)
 Turns the marker in the direction specified coordinates More...
 
void Reinit ()
 Reinitialises this object. More...
 
void Reinit (double tlx, double tly, double brx, double bry, int zoom)
 Reinitialises this object. More...
 
override void Update ()
 Updates marker instance. More...
 
override void Update (double tlx, double tly, double brx, double bry, int zoom)
 Updates marker instance. More...
 
void Update (Bounds bounds, double tlx, double tly, double brx, double bry, int zoom, double ttlx, double ttly, double tbrx, double tbry, float bestYScale)
 Updates marker instance. More...
 
void Update (OnlineMaps map, OnlineMapsControlBase3D control, Bounds bounds, double tlx, double tly, double brx, double bry, int zoom, double ttlx, double ttly, double tbrx, double tbry, float bestYScale)
 Updates marker instance. More...
 
- Public Member Functions inherited from OnlineMapsMarkerBase
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...
 
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...
 

Public Attributes

float? altitude
 Altitude (meters). More...
 
OnlineMapsAltitudeType altitudeType = OnlineMapsAltitudeType.absolute
 Type of altitude More...
 
bool checkMapBoundaries = true
 Need to check the map boundaries?
It allows you to make 3D markers, which are active outside the map. More...
 
OnlineMapsControlBase3D control
 Reference of 3D control. More...
 
bool inited = false
 Specifies whether the marker is initialized. More...
 
GameObject instance
 The instance. More...
 
GameObject prefab
 Marker prefab GameObject. More...
 
SizeType sizeType = SizeType.scene
 How marker size will be calculated. More...
 
- Public Attributes inherited from OnlineMapsMarkerBase
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...
 

Properties

override bool enabled [set]
 Gets or sets marker enabled. More...
 
Vector3? relativePosition [get]
 Returns the position of the marker relative to Texture. More...
 
Quaternion? rotation [get, set]
 Gets or sets rotation of 3D marker. More...
 
float rotationY [get, set]
 Y rotation of 3D marker (degree). More...
 
Transform? transform [get]
 Gets the instance transform. More...
 
- Properties inherited from OnlineMapsMarkerBase
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...
 

Additional Inherited Members

- Static Public Attributes inherited from OnlineMapsMarkerBase
static Action< OnlineMapsMarkerBaseOnMarkerDrawTooltip
 Default event caused to draw tooltip. More...
 

Detailed Description

3D marker class.
Can be used only when the source display - Texture or Tileset.

Member Enumeration Documentation

◆ SizeType

Type of 3d marker size

Enumerator
scene 

Uses transform.scale of marker instance. Same for each zoom level

realWorld 

Scale is 1 for zoom - 20, and is halved every previous zoom

meters 

Specific marker size in meters

Constructor & Destructor Documentation

◆ OnlineMapsMarker3D() [1/2]

OnlineMapsMarker3D.OnlineMapsMarker3D ( )

Constructor of 3D marker

◆ OnlineMapsMarker3D() [2/2]

OnlineMapsMarker3D.OnlineMapsMarker3D ( GameObject  instance)

Create 3D marker from an existing GameObject.

Parameters
instanceGameObject to be used as a 3D marker.

Member Function Documentation

◆ Init()

void OnlineMapsMarker3D.Init ( Transform  parent)

Initializes this object.

Parameters
parentThe parent transform.

◆ LookToCoordinates()

override void OnlineMapsMarker3D.LookToCoordinates ( OnlineMapsVector2d  coordinates)
virtual

Turns the marker in the direction specified coordinates

Parameters
coordinatesThe coordinates

Reimplemented from OnlineMapsMarkerBase.

◆ Reinit() [1/2]

void OnlineMapsMarker3D.Reinit ( )

Reinitialises this object.

◆ Reinit() [2/2]

void OnlineMapsMarker3D.Reinit ( double  tlx,
double  tly,
double  brx,
double  bry,
int  zoom 
)

Reinitialises this object.

Parameters
tlxTop-left longitude of map
tlyTop-left latitude of map
brxBottom-right longitude of map
bryBottom-right latitude of map
zoomMap zoom

◆ Update() [1/4]

override void OnlineMapsMarker3D.Update ( )
virtual

Updates marker instance.

Reimplemented from OnlineMapsMarkerBase.

◆ Update() [2/4]

void OnlineMapsMarker3D.Update ( Bounds  bounds,
double  tlx,
double  tly,
double  brx,
double  bry,
int  zoom,
double  ttlx,
double  ttly,
double  tbrx,
double  tbry,
float  bestYScale 
)

Updates marker instance.

Parameters
boundsBounds of the map mesh
tlxLongitude of top-left corner of the map
tlyLatitude of top-left corner of the map
brxLongitude of bottom-right corner of the map
bryLatitude of bottom-right corner of the map
zoomZoom of the map
ttlxTile X of top-left corner of the map
ttlyTile Y of top-left corner of the map
tbrxTile X of bottom-right corner of the map
tbryTile Y of bottom-right corner of the map
bestYScaleBest y scale for current map view

◆ Update() [3/4]

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

Updates marker instance.

Parameters
tlxLongitude of top-left corner of the map
tlyLatitude of top-left corner of the map
brxLongitude of bottom-right corner of the map
bryLatitude of bottom-right corner of the map
zoomZoom of the map

Reimplemented from OnlineMapsMarkerBase.

◆ Update() [4/4]

void OnlineMapsMarker3D.Update ( OnlineMaps  map,
OnlineMapsControlBase3D  control,
Bounds  bounds,
double  tlx,
double  tly,
double  brx,
double  bry,
int  zoom,
double  ttlx,
double  ttly,
double  tbrx,
double  tbry,
float  bestYScale 
)

Updates marker instance.

Parameters
mapReference to the map
controlReference to the control
boundsBounds of the map mesh
tlxLongitude of top-left corner of the map
tlyLatitude of top-left corner of the map
brxLongitude of bottom-right corner of the map
bryLatitude of bottom-right corner of the map
zoomZoom of the map
ttlxTile X of top-left corner of the map
ttlyTile Y of top-left corner of the map
tbrxTile X of bottom-right corner of the map
tbryTile Y of bottom-right corner of the map
bestYScaleBest y scale for current map view

Member Data Documentation

◆ altitude

float? OnlineMapsMarker3D.altitude

Altitude (meters).

◆ altitudeType

OnlineMapsAltitudeType OnlineMapsMarker3D.altitudeType = OnlineMapsAltitudeType.absolute

Type of altitude

◆ checkMapBoundaries

bool OnlineMapsMarker3D.checkMapBoundaries = true

Need to check the map boundaries?
It allows you to make 3D markers, which are active outside the map.

◆ control

OnlineMapsControlBase3D OnlineMapsMarker3D.control

Reference of 3D control.

◆ inited

bool OnlineMapsMarker3D.inited = false

Specifies whether the marker is initialized.

◆ instance

GameObject OnlineMapsMarker3D.instance

The instance.

◆ prefab

GameObject OnlineMapsMarker3D.prefab

Marker prefab GameObject.

◆ sizeType

SizeType OnlineMapsMarker3D.sizeType = SizeType.scene

How marker size will be calculated.

Property Documentation

◆ enabled

override bool OnlineMapsMarker3D.enabled
set

Gets or sets marker enabled.

true if enabled, false if not.

◆ relativePosition

Vector3? OnlineMapsMarker3D.relativePosition
get

Returns the position of the marker relative to Texture.

The relative position.

◆ rotation

Quaternion? OnlineMapsMarker3D.rotation
getset

Gets or sets rotation of 3D marker.

◆ rotationY

float OnlineMapsMarker3D.rotationY
getset

Y rotation of 3D marker (degree).

◆ transform

Transform? OnlineMapsMarker3D.transform
get

Gets the instance transform.

The transform.