I want to obtain latitude and longitude from map of a city. I have some questions:
1- first how a map can be loaded into the Qt project?
2- I need by clicking on the map, Lat and Lon be obtained.
Thanks in advance.
I want to obtain latitude and longitude from map of a city. I have some questions:
1- first how a map can be loaded into the Qt project?
2- I need by clicking on the map, Lat and Lon be obtained.
Thanks in advance.
1. In whatever way, and using whatever method, is appropriate for the format in which the geographic data is stored. This may be as simple as loading a single image (QImage), or something vastly more involved.
2. Get the screen coordinate the user clicked on from the widget displaying the chart (maybe QWidget::mousePressEvent, maybe something else) Do some sort of mathematics to map that value to the lat/lon of the point under the cursor. This mapping will have to take into consideration the projection of the underlying chart.
KT_HG (20th January 2016)
Thanks Chris,
I have little knowledge about storing geographic data. Please give me some references for studding. For example if I have a offline (saved) google map of a city, then how can I load it into a QWidget?
Could you explain more about "sorting of mathematics to map that value to the lat/lon of the point under the cursor" please?
http://inqlude.org/libraries/marble.html
Cheers,
_
Bookmarks