This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to use Open street map with “Qt 3.3 " and it must be “fully OFFLINE”

0

How can i use Open Street maps with qt 3.3 qCanvas and QPainter. It must be offline......

asked 20 Apr '12, 18:14

jithin917's gravatar image

jithin917
11112
accept rate: 0%

2

Please explain a bit more what you want your program to do. Also... do you really need to use an 8-years old version of Qt ?

(20 Apr '12, 18:44) Vincent de P... ♦

Sir , I have already developed a simple program with Qt 3.3 , I want to include a map also in my program. I done a complete set of functions using Qt 3.3 and itz tested also. so i dnt want to take much efforts to include a map also. So please help me to include a map in qt 3.3 . I am painting all things using QCanvas ans QPainter. If i want to upgrade i have to change all my class . Qt 4 hve no QCanvas. Its having QGraphicsView.

Please Help. Thanks in advance

(21 Apr '12, 07:55) jithin917

2 Answers:

3

Merkaartor, one of the OSM editor programs, is written in C++ using Qt, so you could start by browsing its source to see how it renders OSM data.

answered 21 Apr '12, 12:15

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.3k1785108
accept rate: 18%

2

There are no ready-made libraries that would do this for you. You could either choose to display ready-made bitmap tiles (which you would first have to produce store locally), or you could read vector data and draw it. Which of these methods is better depends on a lot of factors and you have not given us enough information to recommend one over the other. You might want to check out the Gosmore or Navit source code. Both programs preprocess and display OSM vector maps, both are written in C but use GTK and not Qt so you'd have to do quite a bit of adaptation.

Also see this discussion on stackoverflow.com which recommends using the "Marble" widget.

answered 21 Apr '12, 11:29

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .