Maps, Location API, custom plugin and QML
-
Hello,
I scanned some paper maps and I would like to write an app to display them.
Initially, I cut it in small tiles and I wanted to display them by using an GridView and an C++ listModel.But I discovered the Qt Location API and finally I think that I go to try to create my own plugin map service provider, by sub-classing these classes:
http://doc.qt.digia.com/qtmobility/location-overview.html#implementing-pluginsI'm an beginner in c++, this will be maybe difficult, but I will try.
But I don't understand how to integrate them into QML?
All these classes are for QWidgets.
How to subclasse QGeoMapData::paint() to draw a map into the Quick view?
And how can I call my plugin from the QML?There is a way to import maps from C++ to QML, like QQuickImageProvider for images?
Is there some documentations that can help me?
Is the QML location API ready for that? Or is it in work in progress?
Thanks.
-
Ok, I believe that I have to subclasse QQuickPaintedItem or to use the Scene Graphe API.
http://qt-project.org/doc/qt-5/qtquick-visualcanvas-scenegraph.html#custom-items-using-qpainterHum. I go to use a GridView and a ListModel, it's easier ;-)