new PSVMarker( properties, psv )

Description

Object representing a marker

Parameters
Name Type Description
properties Object

see http://photo-sphere-viewer.js.org/markers.html#config (merged with the object itself)

psv PhotoSphereViewer
Throws

when the configuration is incorrect

Details

Members


<static, readonly> $el :HTMLDivElement|SVGElement

Details
HTMLDivElement | SVGElement

<static, readonly> id :string

Details
string

<static, readonly> type :string

Details
string

<static, readonly> types :Array.<string>

Types of markers

Details
Array.<string>

<protected, readonly> psv :PhotoSphereViewer

Details

visible :boolean

Details
boolean

Methods


<static> getType( properties [, allowNone ] ) → {string}

Determines the type of a marker by the available properties

Parameters
Name Type Attributes Default Description
properties object
allowNone boolean <optional>
false
Returns
Throws

when the marker's type cannot be found

Details

destroy()

Destroys the marker

Details

getScale( zoomLevel ) → {float}

Computes marker scale from zoom level

Parameters
Name Type Description
zoomLevel float
Returns
Details

isNormal() → {boolean}

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

Returns
Details

isPoly() → {boolean}

Checks if it is a polygon/polyline marker

Returns
Details

isPolygon() → {boolean}

Checks if it is a polygon marker

Returns
Details

isPolyline() → {boolean}

Checks if it is a polyline marker

Returns
Details

isSvg() → {boolean}

Checks if it is an SVG marker

Returns
Details

update( [ properties ] )

Updates the marker with new properties

Parameters
Name Type Attributes Description
properties object <optional>
Throws

when trying to change the marker's type

Details