Class: Marker

new Marker (properties, psv)

Object representing a marker

Name Type Description
properties PSV.plugins.MarkersPlugin.Properties
psv PSV.Viewer
Throws:

when the configuration is incorrect

Type
PSV.PSVError

Members

$el HTMLElement | SVGElement readonly

Original configuration of the marker

data any

User data associated to the marker

id string readonly

props Object protected

Computed properties

Properties:
Name Type Description
inViewport boolean
dynamicSize boolean
anchor PSV.Point
position PSV.Position

position in spherical coordinates

position2D PSV.Point

position in viewer coordinates

positions3D Array.<external:THREE.Vector3>

positions in 3D space

width number
height number
def *

psv PSV.Viewer protectedreadonly

Tooltip instance for this marker

type string readonly

visible boolean protected

Methods

PSV.plugins.MarkersPlugin.Marker.getType (properties, allowNone)string static

Determines the type of a marker by the available properties

Name Type Default Description
properties Marker.Properties
allowNone boolean false optional
Throws:

when the marker's type cannot be found

Type
PSV.PSVError
Returns:
Type Description
string

destroy ()

Destroys the marker

getListContent ()*

Returns the markers list content for the marker, it can be either :

  • the listContent
  • the tooltip.content
  • the html
  • the id

Returns:
Type Description
*

getScale (zoomLevel)number

Computes marker scale from zoom level

Name Type Description
zoomLevel number
Returns:
Type Description
number

hideTooltip ()

Hides the tooltip of this marker

isNormal ()boolean

Checks if it is a normal marker (image or html)

Returns:
Type Description
boolean

isPoly ()boolean

Checks if it is a polygon/polyline marker

Returns:
Type Description
boolean

isPolygon ()boolean

Checks if it is a polygon marker

Returns:
Type Description
boolean

isPolyline ()boolean

Checks if it is a polyline marker

Returns:
Type Description
boolean

isPolyPx ()boolean

Checks if it is a polygon/polyline using pixel coordinates

Returns:
Type Description
boolean

isPolyRad ()boolean

Checks if it is a polygon/polyline using radian coordinates

Returns:
Type Description
boolean

isSvg ()boolean

Checks if it is an SVG marker

Returns:
Type Description
boolean

showTooltip (mousePosition)

Display the tooltip of this marker

Name Type Description
mousePosition Object optional

update (properties)

Updates the marker with new properties

Name Type Description
properties PSV.plugins.MarkersPlugin.Properties
Throws:

when trying to change the marker's type

Type
PSV.PSVError