Marker Functionality

Marker Functionality

The ability to easily and accurately add location markers to XP360 panoramas is one of the primary functions of the API.

This section covers functions related to working with markers. A complete list of the default marker types can be found here. For information about using your own marker icons, please visit this section.

Definitions:

SphereMarker - The green sphere icon that is used represent nearby sphere

CustomMarker - Any map icon that used to represent a point on the map, whether it’s from out default library or user specified.


setSphereMarkerList

Set a list of specific sphere markers to display, regardless of the distance defined by sphereMarkerDistance. The list contains sphere ids. Set to [] to clear the list.

addMarker

Adds a marker to the sphere, either at a specified latitude and longitude, or at the specified address.

removeAllMarkers

Deletes all markers by setting sphereData to an object with only an empty layers array.

setCustomMarkerList

Set a list of specific custom markers to display, regardless of the distance defined by customMarkerDistance. The list contains custom marker ids. Set to [] to clear the list.

getMarker

Searches for a marker with the given id, passes it to the optional callback function (if provided), and returns it.

setCustomMarkerDistance

Sets the distance, in meters, for which custom markers are displayed. Set to zero to not display any custom markers. Ignored if there is a custom marker list (see setCustomMarkerList).