Estoy tratando de usar Photo Sphere Viewer y Markers juntos. Necesito poder hacer clic en un marcador mediante programación. Esperaba hacer una función para hacer clic en ellos cuando el marcador se mira así:
spherePlayerInstance.on("position-updated", (e, position) => { for (const [key, value] of Object.entries(markersPlugin.markers)) { //If the position of the marker matches the position we are looking at if ( position.latitude.toFixed(1) == value["props"]["position"]["latitude"].toFixed(1) && position.longitude.toFixed(1) == value["props"]["position"]["longitude"].toFixed(1) ) { var elem = document.getElementById( "psv-marker-" + value["config"]["id"] ); elem.click(); } } });Esto simplemente devuelve indefinido para la función de clic.
Habría pensado que habría una función para hacer clic en un marcador, pero no creo que la haya.
Cualquier ayuda sería apreciada. Gracias