c++ – Qt custom geoservice plugin


I am using the Map component for QML and bleeding from my nose I need to make support for various map providers, such as Yandex, Google, Yahoo, etc. I try to implement everything using standard means. While it turns out, besides what the subject is about. Out of the box, Qt only supports HERE, OSM and mapbox.

In the existing, stripped-down, artisanal Qt Widget version, it all boiled down to just changing the link from osm to Yandex. Can't I somehow inherit from one of the plugin classes and override the function that makes the request to the server?

I found such a solution https://habrahabr.ru/post/233809/ . But here you need to fork QtLocation, and in my opinion this is a crutch, since Qt will need to be rebuilt and will not compile on another machine just like that. http://www.qtcentre.org/threads/44476-creating-custom-mapping-plugin-for-QtLocation here's another, but I can't figure it out because the guy does not give all the code.


The code in the last article I gave is old


I heard about marble on KDE. So, this thing works somehow. https://marble.kde.org Experience has shown that if you need third-party providers, it is easier to use it, though you have to finish it.

SOLUTION And the casket opened quite simply. First, the link is https://github.com/vladest/googlemaps This is someone's ready-made plugin. Download it to your computer in a convenient way. Further, in the MinGW console (there is one in the start menu), go to the folder with the googlemaps.pro file (cd command), execute three commands:

qmake googlemaps.pro
mingw32-make install

How plugins work inside is described here https://habrahabr.ru/post/233809/

Now I'm worried about how to put Yandex on the Google tile grid or redo this grid in general, because Yandex and Google have different projections

Scroll to Top