Get current geolocation of phone in map, and automatically orient panorama

  • Dear all, I am making an on-location panoramic tour with a couple of panoramic renders (around a place where once was an old castle). Now I want people to walk to that location, stand on the spots on the map, and look at the castle on their phone. Two things are missing: 1) is there a way to put the current location of the user/phone on that map, like you can in google maps itself, 2) and is there a way in which the panorama can automatically orient itself, aligning (in my case) North.
    This is the current state: https://dataportal.nioz.nl/visualmodels/VR/
    Any further suggestions are also welcome!
    Thanks for any suggestion. Johan

  • Hi,

    you can use the browsers Geolocation API for this:
    https://developer.mozilla.org/en-US/docs/Web…location-objekt

    Here a quick example:

    Best regards,
    Klaus

  • Thanks, the button surely works and gives data. But where to put the action and have a button attached to it? In tour.xml, or in the skin where the map is defined.

    I must admit I am not really sure how to do that. Anybody?
    Thanks in advance, Johan

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!