Results 1 to 4 of 4

Thread: getting latitude and longitude from map of a city

  1. #1
    Join Date
    Jan 2016
    Posts
    4
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default getting latitude and longitude from map of a city

    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.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: getting latitude and longitude from map of a city

    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.

  3. The following user says thank you to ChrisW67 for this useful post:

    KT_HG (20th January 2016)

  4. #3
    Join Date
    Jan 2016
    Posts
    4
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: getting latitude and longitude from map of a city

    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?

  5. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: getting latitude and longitude from map of a city


  6. The following 2 users say thank you to anda_skoa for this useful post:

    d_stranz (21st January 2016), KT_HG (21st January 2016)

Similar Threads

  1. Replies: 10
    Last Post: 9th June 2016, 17:02
  2. conversion of x and y coordinates to latitude and longitude
    By bhooshan in forum General Programming
    Replies: 2
    Last Post: 14th May 2015, 09:54
  3. How to write station's name on the city map
    By Roman Novoselov in forum Qwt
    Replies: 7
    Last Post: 15th February 2011, 09:17
  4. confusion city
    By Petr_Kropotkin in forum Newbie
    Replies: 1
    Last Post: 3rd February 2010, 15:30
  5. use Latitude and longitude to calculate distance?
    By lengshuang in forum General Programming
    Replies: 6
    Last Post: 11th May 2009, 14:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.