How to use a map (like google maps) with Qt Quick?
-
One of my bookmark : "examples":http://developer.nokia.com/Community/Wiki/QtQuick_Maps_Examples
Its QtQuick 1 but, it would not be difficult for you to bring it on QQ2.
-
Ignore Previous, try this ""example"":http://qt-project.org/doc/qt-4.8/declarative-modelviews-webview-googlemaps.html
EDIT : Broken link
-
Thanks for your reply. The first example (which I should ignore ;)) is an example I tried and couldnt get to work.
The second example I wasnt able to get to work with QtQuick 2. But unfortunately it uses a webview, which doesnt work on mobile devices, because of the lack of a mobile library. So it wouldnt help :(During the last hours I built my own webview gmaps example and saw the problem with mobile devices and webviews :(
So I need something that works without the webview. -
Oh Yes, it is "not available":http://lists.qt-project.org/pipermail/android-development/2013-May/000114.html yet, afaik.
Now, i am curious how to show the gmaps with out webkit!
-
There is the QTLocation Module (http://qt.gitorious.org/qt/qtlocation/) which should also provide a Map Element, but it seems that it isn't currently bundled and there is no stable release of it yet. But you can try to use it.
-
The location module should work, I think. But you'll need to either write your own data source / plugin, or find one somewhere on the web, as the mobility ones won't work with it, and I can't remember whether or not the ones included in the Qt5 QtLocation module can be used without a license.
Anyway, a webview should still work:
@
import QtQuick 2.0
import QtWebKit 3.0WebView {
url: "http://maps.google.com"
}
@Cheers,
Chris. -
The Qt Location module is planned to be released as part of Qt 5.2, so the deployment process should become easier once Qt 5.2 is released. It includes both the nokia and Open Street Map plugins. The OSM plugin is usable out-of-the-box. To use the nokia plugin you will need to obtain application tokens by registering at "developer.here.com":http://developer.here.com/