Hi Lennart,
thank you for the answer and for the example.
Sorry that I answer very late. I was sick in bed for a few days, almost a week, and unfortunately couldn’t answer any earlier.
The example on Sandcastle helped me a lot and was able to adopt it so far.
However, I have a few additions with which I have unfortunately not been successful and would be very happy if I could get help.
I did it that way, when I click on the “Show Location” button, the camera flies there. This works so far, but if I set the angle of the camera by -45 degrees, then the location is no longer in the view of the camera. It’s postponed. I can fix that manually by setting the (Latitude - 0.100), but normally the script would have to do this itself, so the more precise calculation now, or not?
I have set a PIN for the location with “Cesium.pinBuilder()
”. To better illustrate the location. From this I can see that the location is definitely shifted at “viewer.camera.flyTo()
”. How can I improve this?
I still have the problem that when I scroll into it, the pin disappears in the background. I have a problem with that and don’t know how to fix it.
I also have a question about the location.
With the Geolocation API I get the “longitude” and “langitude” great, but how do I get the height of the location?
Couldn’t I have this calculated using the “langitude” and “longitude”? Unfortunately, I couldn’t find a solution on the Internet.
Here is the code:
From line 378 I commented out an attempt. If I try it out like in the comment, then the globe turns crazy 200 times around until it has reached the location.
Here I couldn’t define the height either
Here I have another function as I set the pin:
Here the pin is at 10,000. But when I scroll through it now, the pin disappears more and more in the background:
Shouldn’t the height be adjusted automatically when scrolling, or not?
I ask for help on these few individual points.
Thank you in advance.
Many greetings