Marker
Marker instances are generated by the Viewer when calling the method viewer.addMarker()
.
marker.bindPopup(options)
marker.getPosition()
marker.setPosition(position)
marker.isVisible()
marker.setVisible(visible)
marker.remove()
marker.bindPopup(options)
Adds a popup that is bound to the marker with the following benefits:
- The popup will follow the marker if its anchor position changes
- Clicking the marker will show the popup (overriding the marker’s
onClick
option) - Setting the marker to not visible will also hide the popup
- Removing the marker removes the popup
Setting autoClose
to true will hide this popup when an existing popup becomes visible.
closeOnClick
can be set to override the viewer’s configured closePopupsOnClick
behaviour; when clicking anywhere on the plan all visible popups will be hidden.
Calling marker.bindPopup()
subsequent times will replace the popup and persist the visible
setting between them. You may pass a null
argument for options
to remove the popup.
marker.getPosition()
marker.setPosition(position)
Sets the position of the marker.
marker.isVisible()
- Returns: <boolean>
Returns true if the marker is visible.
marker.setVisible(visible)
visible
: <boolean>
Sets the visibility of the marker.
marker.remove()
Removes the marker.