PDA

View Full Version : Problem with Graphics View Framework



Disperato
27th May 2009, 18:38
Hi,

I have to visualize a map of the Netherlands. I have the latitude and longitude of many points and convert them to x/y-coordinates via the Mercator projection.
Now my x/y-coordinates lie between, say 60.001 and 60.0015. That's quite a small interval. Now I thought that I could just add all the points to the scene and then tell Qt to scale the view such that the leftmost point lies on the left edge of the view and the rightmost point lies on the right edge.

How would I do that? I'm very confused about the transformations between the scene and the view. Is there a best practice? I don't want to reinvent the wheel.

Help would be very appreciated, as I should get something done by tomorrow … :(

wysota
27th May 2009, 21:44
Set the scene rect to (1, 1, 1500, 1500) so that each unit represents 0.000001.