Class: Marker

new PSV.plugins.MarkersPlugin.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 | THREE.Object3D 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
dynamicSize boolean
anchor PSV.Point
visible boolean

actually visible in the view

staticTooltip boolean

the tooltip must always be shown

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, position)number

Computes marker scale from zoom level

Name Type Description
zoomLevel number
position PSV.Position
Returns:
Type Description
number

hideTooltip ()

Hides the tooltip of this marker

is3d ()boolean

Checks if it is a 3D marker (imageLayer)

Returns:
Type Description
boolean

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

refreshTooltip ()

Recompute the position of the tooltip

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 the configuration is incorrect

Type
PSV.PSVError