PDA

View Full Version : using offline OpenStreetMap



QJak
9th February 2019, 21:19
hi
I want to show offline a small area of a city on map. this link and its example is useful for me:

https://blog.qt.io/blog/2017/05/24/qtlocation-using-offline-map-tiles-openstreetmap-plugin/

i downloaded .osm file by: https://www.openstreetmap.org/export#map

but now 1- I dont know how to convert the osm file to .png(s) files and also 2- I dont know how to name it in pattern of "osm_100-<l|h>-<map_id>-<z>-<x>-<y>.<extension>" that this is the filename pattern.

please help me to solv my two problems. thanks

Cruz
19th February 2019, 12:47
Not that I have detailed insight into this problem, but using the tiles you get from this engine you could compute the color of a pixel and use QImage or QPixmap to generate an image pixel by pixel, and save the image as a png file with the save() function.
The file name you need you could build using QString's facilities, no?