Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The POV angle of the streetview marker icon doesn't reflect what is currently displayed in the Google Panorama container #337

Open
1 task done
Raruto opened this issue Feb 13, 2023 · 2 comments · May be fixed by #344
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@Raruto
Copy link
Collaborator

Raruto commented Feb 13, 2023

Checklist

  • I've searched through the existing issues and this bug has never been reported before

Subject of the issue

As you can see in the image below:

  • in the google panorama container we are looking towards North
  • the marker arrow points towards East

immagine

Steps to reproduce

  1. edit your config.js file (g3w-client) providing it with a valid google key
const G3W_KEYS = {
  google: 'your super secret api key! :)',
};
  1. open a project of your choice (eg: http://localhost:3000/en/map/buildings/qdjango/10/)
  2. click on streetview control control
  3. click anywhere on the map
  4. now without zooming or panning the map your map should look like the image above

Environment

  • g3w-admin: 3.5.dev-20230203102702
  • g3w-client: 3.8.0-alpha.1
  • browser: Firefox v109 and Chrome v109
  • operating system: Windows 10 64 bit

Link to your project

The same issue can be encountered here as well:

https://v35.g3wsuite.it/it/map/demo-35/

Additional info

No response

@Raruto Raruto added the bug Something isn't working label Feb 13, 2023
@volterra79
Copy link
Member

@Raruto this happen first time because no information about orientation come from api. If you start to move from streetview panel, you'll see right orientation of arrow because it calculate from previous position

@Raruto
Copy link
Collaborator Author

Raruto commented Feb 13, 2023

If you start to move from streetview panel, you'll see right orientation of arrow because it calculate from previous position

In my opinion most of the time it is updated on a wrong direction (anyway, just change the zoom level to restore the initial situation with a completely wrong direction of the arrow..).

I don't know if it is currently implemented, but it's also possible to add a listener for the "pov_changed" event:

// Source: https://developers.google.com/maps/documentation/javascript/examples/streetview-events#maps_streetview_events-javascript

panorama.addListener("pov_changed", () => {
  const headingCell = document.getElementById("heading-cell");
  const pitchCell = document.getElementById("pitch-cell");

  headingCell.firstChild.nodeValue = panorama.getPov().heading + "";
  pitchCell.firstChild.nodeValue = panorama.getPov().pitch + "";
});

@volterra79 volterra79 added this to the v3.9 milestone Mar 24, 2023
@Raruto Raruto modified the milestones: v3.9, v3.10 Oct 19, 2023
@Raruto Raruto removed this from the v3.10 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants