PDA

View Full Version : Working with map



naptizaN
28th August 2012, 07:22
Hello, i need to make a widget with an image (map of the city) and some markers on it. It must look like Google maps or something like that but it must not use internet. Should i use some API? If i do, then is there any freeware API? Waiting for your help.

spirit
28th August 2012, 07:38
See ICS Announces Qt Based Google APIs (http://www.qtcentre.org/content/148-ICS-Announces-Qt-Based-Google-APIs).

ChrisW67
28th August 2012, 09:14
I an fairly sure the terms of use for Google Maps (insert almost any provider here) preclude storing their tiles other than for temporary caching so none of the Google Maps stuff is really useful for the stated purpose.

I have done something like this using:

Qt Webkit and the C++ bridge to implement a handler for a custom "maps:" scheme in place of "http:"
A simple URL parser to map x, y, z coordinates to a tile in the store.
OpenLayers to provide the Javascript slippy-map.
mapnik, to generate the tile sets
Natural Earth data sets for coarse global map data and some other finer detail data in particular areas. Open Street Maps is another possibility.
A MapBox mbtiles (Sqlite) data store to hold the tiles


The tile data set becomes very large quickly.

naptizaN
28th August 2012, 12:56
Not sure about google api but will try. If can use simple png or jpeg image as source, maybe there is some api just to work with this?

spirit
28th August 2012, 12:57
To work with what? Images? If so see QImage, QPixmap and QPainter.