Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

83
Vistas
Clicking a Photo Sphere Viewer Marker programmatically

I am trying to use the Photo Sphere Viewer and Markers together. I need to be able to click a marker programmatically. I was hoping to make a function to click them when the marker is being looked at like so:

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();
    }
  }
});

This just returns undefined for the click function.

I would have thought there would be a function for clicking a marker but I don't think there is.

Any help would be appreciated. Thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda