Use satellite view from QtLocation as ground texture in 3D scene - qt

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 !

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.

Related

Creating a Navmesh in Aframe using aframe-inspector-plugin-recast

I'm using Don McCurdy's A-Frame Inspector plugin to try to build a navmesh for some "stairs" that I've constructed essentially by sticking a bunch of box primitives together. You can see a demo at:
http://webvr.decodingsteve.com/stair-nav/
For whatever reason though, I can't get the navmesh to generate, and the error message that's generated is completely opaque. I tried exporting my "stairs" as a single GLTF, (figuring maybe a single object would work better), but that didn't seem to have any effect either.
So, just in case anyone else runs in to a similar problem, it turns out I was making a silly mistake. My scene only had the blocks I was using for stairs in it, and no flat surface, (like a plane), underneath to extend the navmesh on to. Adding a plane for the floor solved the issue and allowed the navmesh to be created.

How to make a draggable and scrollable map with inertia. C#

i am actually trying to follow this tutorial: "How to create a HTML draggable and scrollable map with inertia using Phaser framework" (google it, www. emanueleferonato .com)
Im using Unity but i configured it "pixel perfect" so i can use directly pixels like in AS3 and flashdevelop.
I basically need to make a map for the game where the player can drag in the X axis of the map.
I have no clue of how to do it, also it should have acceleration and deceleration.
Edit:
As i say before, i am using a custom framework that does not allow components, or UI, it works like FlashDevelop and AS3, so imagine the answer is in AS3.
Thanks!
I recommend looking up Unity's UI documentation (AND TUTORIALS!) :D They have really good articles, and the forums are a great resource too.
Regarding your specific problem- Scroll Rect is what you are looking for. You can implement 2D dragging, along with acceleratoion, deceleration, and other kinds of UI physics (inertia, elasticity, etc.) with it.
Please look for tutorials if you're just beginning to dabble with these. I hope that helps!

Getting started with a Tile-based game in Qt using QGraphicsScene and QGraphicsView

I'm going to start programming a 2D tile-based game in Qt and read about the QGraphicsScene and QGraphicsView classes which are intended for displaying and handling lots of 2D objects.
My question is that will it be feasible to create a world with lots of tiles using QGraphicsScene? Can I add the whole world at once tile-by-tile or should I try to implement something to restrict the area a bit? I've read that QGraphicsScene can handle "thousands of items" but a 2D tile map can easily get really, really big (200x200 tiles? not that many, but that's already 40,000 objects which is a lot).
The map is also going to be pretty much static so it might be possible to draw it as one big pixmap but this really prevents you from using all the fancy stuff in QGraphicsScene like handling mouse clicks on independent items etc. On top of that I'm going to draw the player, the NPCs and so forth which will not be aligned to the tile grid. Are there some optimization stuff for using lots of static objects and some dynamic ones on top of them?
Is using QGraphicsScene and QGraphicsView even a good idea at all or should I try to look for an alternative inside Qt or maybe a different, more game-oriented library?
Thanks in advance
You should use QGraphicsView.
The 40,000 Chips int the Qt Documentation is your best example to closely examine. It deals with the complexity of large numbers of elements, drawing them at multiple scales and a lot more.
Play with the example and you will see that all the chips actually make up a large photo if you zoom out and that you can select, and drag and drop multiple chips at any view, or you can zoom in enough to see some text on an individual chip. It will take time to understand each part, but this is a very thorough example to look into.
In the chips.cpp source, it shows how it can still run quickly by using a "LevelOfDetail" or lod variable switch statement based off of the transformation stored in a style option.
Qt Graphics View has been optimized to do a lot of the things you have talked about in your question, but it takes a while to understand how to approach it.
If you are still having issues with the size of the map you want to use, I would store tile layouts on the harddrive and load the ones you need when you need them, and remove the ones you don't need off of the scene as necessary.
QGraphicsScene has the ability to only paint what is being represented in the view, everything else just sits in the the scene index. You have different options for configuring how the scene and view operate to optimize your specific use. Just because you have 40k tiles in your scene index, doesn't mean you need to paint that many. You really only have as many as are being displayed in the resolution of your view.
Also, there are caching options if your items are static, then they only have to be calculated once and can be retrieved from a pixmap cache.
Ultimately I think its completely worth your time to try it out. It should be fairly easy for you to mock up a test where you populate your scene with a very large number of tiles and simply try scrolling around the view. I feel its not so much a concern with how many tiles you have, but rather how complex the graphics are within the actual view being painted.
I'm working on a similar project and I'm using a 30x30 grid of persistent QGraphicsPixmapItems. When the view of the map changes, the QGraphicsscene iterates over the part of the map array that's currently in view, calling setPixmap on each tile to change it over to the new tile type. It's been working pretty smoothly and I don't have any performance complaints thus far.
I agree with what has been said. I've been doing QGraphicsView-based games for years (if you're on Linux, ask your package manager for KDiamond or Palapeli if you like), and while rendering performance has been an issue when QGraphicsView first came out years ago, these problems are now generally solved.
What you should be concerned about is memory consumption. The chips example may have as many chips as you want to have tiles, but those chips are not kept in memory as pixmaps. If each tile is a fixed-size 50x50px image, that's already
32bits*50px*50px*200*200 = 381,9 MiB

Tool to easily create image maps

I need to create an image map, but the shapes are quite complicated, and would take forever for me to do.
Is there any sort of tool that allows you to easily plot out the points for a map?
The Gimp: http://www.gimp.org/tutorials/Image_Map/ and http://docs.gimp.org/en/plug-in-imagemap.html
There are some online tools - http://www.maschek.hu/imagemap/imgmap, http://dhost.info/eleomap, http://www.mobilefish.com/services/image_map/image_map.php
This is actually the one place where it's still OK to use Dreamweaver. Creating complex image maps in DW is as simple as clicking around the outside of the shape to add points.

I need to design usa interactive Map in flex

i need of simple UsA map in flex ,all Area need to be click able as button .
Is there any tool available for designing buttons in various shape in flex or any build in free map is available in flex.
As vector format so that zoom in will not affect the quality.
i need to design like as shown in this site
http://www.futurevision.com.ua/products/usa_flash_map.php
This is the Degrafa Map Demo. It is still in the samples section so perhaps the site was down at the time.
data viz sample page here:: http://www.degrafa.org/samples/data-visualization.html
Load the "Map Dashboard" sample and Right click/View source to get at the code.
Cheers
Jason.
I posted a similar question a while ago but needed more customization.
I used SVG path data in Degrafa to create custom maps of the world, continents, USA.. for a customer. Degrafa used to have a nice US map demo (with source code) as part of its samples, but it disappeared from the web. I don't know of any tool that would help to design clickable Flex shapes. I have no doubt though that Degrafa will provide more support and tools for converting and using SVG.
Some products I found: ilog, ArcGis
And also found this open-source library : GeoVis (birdeye)
But it's very unstable and haven't seen many changes recently.
I'll do that (or, I'll have a designer to do that) in illustrator, and then import the vector format in flex, with the [Embed] metadata.
I don't know if it is a downside for you (for me is a plus), but in this way you have to do everything in code, not with the FlexBuilder UI.

Resources