0

I'm building a flight simulator in Qt, and I would like to display a satellite view on the floor. I saw that satellite views were accessible with QtLocation.

Is there a way to extract a picture from this plugin (giving center or corner coordinates and zoom level) so that I can use it to texture a fixed size plane?

For the moment, my code is full C++ (no qml), so if there is a way to do it that way, I'll be happy. But if the easiest solution is to switch my scene to qml, I can do that.

By the way, the source I plan to use is "World Imagery" from "esri", so perhaps there is a solution without QtLocation, I have no idea of what will be the simplest.

Thanks in advance !

Pascal
  • 31
  • 3
  • It doesn't matter whether you write your program in QML or C++, as QML simply instantiates the C++ types. I.e. there is always a C++ class corresponding to the QML type. Is there no way for you to obtain the images first and put them in your project folder? If you retrieve them from esri everytime your application starts then there won't be any images if the internet is gone for example ;) Btw do you have a link to your repository? I'm curious and would love to have look at it! – Florian Blume Oct 22 '18 at 12:34
  • Hi, Thanks for your explanations for the link between QML and C++! I never used QML before, so that is still blurry for me. I don't even know how to get images from QtLocation to put them in the folder. The flight location is not known until runtime. But if I understood QtLocation correctly, it has a cache system already built-in, so I hoped to take advantage of that. The simulator is for a company project and is not released yet (but we plan to opensource the simulator when the product will be on the market) – Pascal Oct 22 '18 at 12:40

1 Answers1

0

I solved my problem by getting round it. I used the REST API of ArcGIS, making my program download tiles to the hard drive when a new one is needed and using this file as a texture. Using that, I do also have a cache functionality as suggested by @Florian Blume.

Pascal
  • 31
  • 3