raptorswing / MapGraphics

A tile-based "slippy map" library written in/for C++/Qt. It's meant to enable C++/Qt developers to easily add nice, interactive maps to their applications. Supports zooming, rotating, interactive custom map objects, transparency, etc. It is a Qt map widget that can use tiles from MapQuest, Openstreetmap, or a custom source you define.
Other
164 stars 77 forks source link

Get latitude/longitude on mouse double click #19

Closed alessandroAM closed 2 years ago

alessandroAM commented 7 years ago

Hello, any chance to know how to gather latitude/longitude when the user clicks on the map? I tried using the xyz2lla functions but they all return odd values. Thanks.

kantooon commented 7 years ago

Check project Qradiopredict for a sample implementation (now probably outdated). You might need to rebase the code against latest upstream (this project).

On 6 December 2016 00:39:42 GMT, alessandroAM notifications@github.com wrote:

Hello, any chance to know how to gather latitude/longitude when the user clicks on the map? I tried using the xyz2lla functions but they all return odd values. Thanks.

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

alessandroAM commented 7 years ago

Hello and thanks a lot for the quick reply, I followed your hint and got it done. The only issue left that I have is the wheelEvent not working (actually it doesn't fire at all); so using the wheel mouse on the widget just makes it scroll on the vertical. But I suppose it's a Qt4.7/Mac related issue as I have seen countless users with the same QWheelEvent issue. Anyway, thanks again for this brilliant project and support!