Displays various markers on the viewer
| Name | Type | Description |
|---|---|---|
psv |
PSV.Viewer | |
options |
PSV.plugins.MarkersPlugin.Options | optional |
Extends
Classes
- Marker
Object representing a marker
Members
-
Available events
-
-
-
-
Unique identifier of the plugin
-
-
markers Object.<string, PSV.plugins.MarkersPlugin.Marker>
All registered markers
-
-
psv PSV.Viewer readonly inherited overrides
Reference to main controller
-
-
Methods
-
addMarker (properties, render)PSV.plugins.MarkersPlugin.Marker
Adds a new marker to viewer
-
Name Type Default Description propertiesPSV.plugins.MarkersPlugin.Properties renderboolean true optional renders the marker immediately
Throws:
-
when the marker's id is missing or already exists
- Type
- PSV.PSVError
Returns:
Type Description PSV.plugins.MarkersPlugin.Marker -
-
Removes all markers
-
Name Type Default Description renderboolean true optional renders the markers immediately
-
destroy () package overrides
-
-
getCurrentMarker ()PSV.plugins.MarkersPlugin.Marker
Returns the last marker selected by the user
-
Returns:
Type Description PSV.plugins.MarkersPlugin.Marker -
getMarker (markerId)PSV.plugins.MarkersPlugin.Marker
Returns the internal marker object for a marker id
-
Name Type Description markerIdstring Throws:
-
when the marker cannot be found
- Type
- PSV.PSVError
Returns:
Type Description PSV.plugins.MarkersPlugin.Marker -
-
getMarkers ()Array.<PSV.plugins.MarkersPlugin.Marker>
Returns all the markers
-
Returns:
Type Description Array.<PSV.plugins.MarkersPlugin.Marker> -
Returns the total number of markers
-
Returns:
Type Description number -
gotoMarker (markerId, speed)PSV.utils.Animation
Rotate the view to face the marker
-
Name Type Description markerIdstring speedstring | number optional rotates smoothy, see PSV.Viewer#animate
Fires:
Returns:
Type Description PSV.utils.Animation A promise that will be resolved when the animation finishes -
Hides all markers
-
Fires:
-
Hides all tooltips
-
-
Hides a marker
-
Name Type Description markerIdstring -
Closes side panel if it contains the list of markers
-
-
Hides the tooltip
-
Name Type Description markerIdstring -
init () package overrides
-
-
Removes a marker from the viewer
-
Name Type Default Description markerIdstring renderboolean true optional renders the marker immediately
-
Removes multiple markers
-
Name Type Default Description markerIdsArray.<string> renderboolean true optional renders the markers immediately
-
Updates the visibility and the position of all markers
-
-
Replaces all markers
-
Name Type Default Description markersArray.<PSV.plugins.MarkersPlugin.Properties> renderboolean true optional renders the marker immediately
-
Shows all markers
-
Fires:
-
Displays all tooltips
-
-
Shows a marker
-
Name Type Description markerIdstring -
Opens the panel with the content of the marker
-
Name Type Description markerIdstring -
Opens side panel with the list of markers
-
Fires:
-
Forces the display of the tooltip
-
Name Type Description markerIdstring -
Toggles the visibility of all tooltips
-
-
Toggles a marker
-
Name Type Default Description markerIdstring visibleboolean null optional -
Toggles the visibility of the list of markers
-
-
updateMarker (properties, render)PSV.plugins.MarkersPlugin.Marker
Updates the existing marker with the same id
-
Every property can be changed but you can't change its type (Eg:
imagetohtml).Name Type Default Description propertiesPSV.plugins.MarkersPlugin.Properties renderboolean true optional renders the marker immediately
Returns:
Type Description PSV.plugins.MarkersPlugin.Marker
Type Definitions
-
Properties:
Name Type Argument Default Description clickEventOnMarkerboolean <optional>
false If a
clickevent is triggered on the viewer additionally to theselect-markerevent.gotoMarkerSpeedstring | number <optional>
8rpm Default animation speed for
gotoMarkermethodmarkersArray.<PSV.plugins.MarkersPlugin.Properties> <optional>
-
Marker properties, see https://photo-sphere-viewer.js.org/plugins/plugin-markers.html#markers-options
-
-
Data of the
select-markerevent -
Properties:
Name Type Description dblclickboolean if the selection originated from a double click, the simple click is always fired before the double click
rightclickboolean if the selection originated from a right click
Events
-
Triggered when the animation to a marker is done
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker -
Triggered when the markers are hidden
-
-
Triggered when the user puts the cursor away from a marker
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker -
Triggered when the visibility of a marker changes
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker visibleboolean -
Triggered when the user puts the cursor hover a marker
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker -
Triggered when the user clicks on a marker. The marker can be retrieved from outside the event handler with PSV.plugins.MarkersPlugin.getCurrentMarker
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker dataPSV.plugins.MarkersPlugin.SelectMarkerData -
Triggered when a marker is selected from the side panel
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker -
Triggered when the list of markers changes
-
Name Type Description markersArray.<PSV.plugins.MarkersPlugin.Marker> -
Triggered when the markers are shown
-
-
Triggered when a marker was selected and the user clicks elsewhere
-
Name Type Description markerPSV.plugins.MarkersPlugin.Marker -
Used to alter the list of markers displayed on the side-panel
-
Name Type Description markersArray.<PSV.plugins.MarkersPlugin.Marker> Returns:
Type Description Array.<PSV.plugins.MarkersPlugin.Marker>