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

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.

permanent link

answered 21 Apr '12, 12:15

Jonathan%20Bennett's gravatar image

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

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.

permanent link

answered 21 Apr '12, 11:29

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
70.0k806341097
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×94
×7

question asked: 20 Apr '12, 18:14

question was seen: 5,148 times

last updated: 21 Apr '12, 12:15

powered by OSQA