Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

82
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda