Online Maps v3
Loading...
Searching...
No Matches
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 { scene , realWorld , meters }
 Type of 3d marker size. More...
 

Public Member Functions

 OnlineMapsMarker3D ()
 Constructor of 3D marker.
 
 OnlineMapsMarker3D (GameObject instance)
 Create 3D marker from an existing GameObject.
 
void Init (Transform parent)
 Initializes this object.
 
override void LookToCoordinates (OnlineMapsVector2d coordinates)
 Turns the marker in the direction specified coordinates.
 
void Reinit ()
 Reinitialises this object.
 
void Reinit (double tlx, double tly, double brx, double bry, int zoom)
 Reinitialises this object.
 
override void Update ()
 Updates marker instance.
 
override void Update (double tlx, double tly, double brx, double bry, int zoom)
 Updates marker instance.
 
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.
 
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.
 
- Public Member Functions inherited from OnlineMapsMarkerBase
virtual void Dispose ()
 Disposes marker.
 
Get< T > (string key)
 Gets the value from the customFields dictionary by key.
 
void GetPosition (out double lng, out double lat)
 Gets location of marker.
 
void GetTilePosition (out double px, out double py)
 Get tile position of the marker.
 
void GetTilePosition (out double px, out double py, int zoom)
 Get tile position of the marker.
 
void GetTilePosition (int zoom, out double px, out double py)
 Get tile position of the marker.
 
bool InMapView ()
 Checks if the marker is in the current map view.
 
void LookToCoordinates (double longitude, double latitude)
 Turns the marker in the direction specified coordinates.
 
void SetPosition (double lng, double lat)
 Set location of marker.
 
void SetDraggable (bool value=true)
 Makes the marker draggable or un draggable.
 

Public Attributes

float? altitude
 Altitude (meters).
 
OnlineMapsAltitudeType altitudeType = OnlineMapsAltitudeType.absolute
 Type of altitude.
 
bool checkMapBoundaries = true
 Need to check the map boundaries?
It allows you to make 3D markers, which are active outside the map.
 
OnlineMapsControlBase3D control
 Reference of 3D control.
 
bool inited = false
 Specifies whether the marker is initialized.
 
GameObject instance
 The instance.
 
GameObject prefab
 Marker prefab GameObject.
 
SizeType sizeType = SizeType.scene
 How marker size will be calculated.
 
- Public Attributes inherited from OnlineMapsMarkerBase
Action< OnlineMapsMarkerBaseOnClick
 Events that occur when user click on the marker.
 
Action< OnlineMapsMarkerBaseOnDoubleClick
 Events that occur when user double click on the marker.
 
Action< OnlineMapsMarkerBaseOnDrag
 Events that occur when user drag the marker.
 
Action< OnlineMapsMarkerBaseOnDrawTooltip
 Event caused to draw tooltip.
 
Action< OnlineMapsMarkerBaseOnEnabledChange
 Event occurs when the marker enabled change.
 
Action< OnlineMapsMarkerBaseOnInitComplete
 Event occurs when the marker is initialized.
 
Action< OnlineMapsMarkerBaseOnLongPress
 Events that occur when user long press on the marker.
 
Action< OnlineMapsMarkerBaseOnPress
 Events that occur when user press on the marker.
 
Action< OnlineMapsMarkerBaseOnPositionChanged
 Event that occurs when the marker position changed.
 
Action< OnlineMapsMarkerBaseOnRelease
 Events that occur when user release on the marker.
 
Action< OnlineMapsMarkerBaseOnRollOut
 Events that occur when user roll out marker.
 
Action< OnlineMapsMarkerBaseOnRollOver
 Events that occur when user roll over marker.
 
string label = ""
 Marker label.
 
OnlineMapsRange range
 Zoom range, in which the marker will be displayed.
 
List< string > tags
 List of tags.
 

Properties

override bool enabled [set]
 Gets or sets marker enabled.
 
Vector3 relativePosition [get]
 Returns the position of the marker relative to Texture.
 
Quaternion rotation [get, set]
 Gets or sets rotation of 3D marker.
 
float rotationY [get, set]
 Y rotation of 3D marker (degree).
 
Transform transform [get]
 Gets the instance transform.
 
- Properties inherited from OnlineMapsMarkerBase
Dictionary< string, object > customFields [get]
 Get customFields dictionary.
 
virtual bool enabled [get, set]
 Gets or sets marker enabled.
 
bool isDraggable [get, set]
 Makes the marker draggable or un draggable.
 
IOnlineMapsInteractiveElementManager manager [get, set]
 Reference to Marker Manager.
 
Vector2 position [get, set]
 Marker coordinates.
 
virtual float scale [get, set]
 Scale of marker.
 
virtual bool inMapView [get]
 Checks to display marker in current map view.
 
object this[string key] [get, set]
 Get or set a value in the customFields dictionary by key.
 

Additional Inherited Members

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

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()

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()

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/3]

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() [2/3]

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() [3/3]

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

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.

◆ transform

Transform OnlineMapsMarker3D.transform
get

Gets the instance transform.

The transform.