Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to use a map (like google maps) with Qt Quick?
Forum Updated to NodeBB v4.3 + New Features

How to use a map (like google maps) with Qt Quick?

Scheduled Pinned Locked Moved QML and Qt Quick
12 Posts 5 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DerMas
    wrote on 3 Sept 2013, 10:52 last edited by
    #1

    I want to display a map with my Qt Quick 2.1 application, but I cant find a good example on how to do that. I dont develop for a nokia device, but for android.

    So can somebody post a working example of using a map? It could be google maps, open streetmap or whatever :)
    Or give me a hint, where I can find more info on that topic that is not relatetd to a nokia device?

    Edit: WebView doesnt work on mobile devices, so that is no option.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on 3 Sept 2013, 11:30 last edited by
      #2

      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.


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rahul Das
        wrote on 3 Sept 2013, 11:34 last edited by
        #3

        Ignore Previous, try this ""example"":http://qt-project.org/doc/qt-4.8/declarative-modelviews-webview-googlemaps.html

        EDIT : Broken link


        Declaration of (Platform) independence.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DerMas
          wrote on 3 Sept 2013, 14:14 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rahul Das
            wrote on 4 Sept 2013, 04:06 last edited by
            #5

            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!


            Declaration of (Platform) independence.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DerMas
              wrote on 4 Sept 2013, 06:08 last edited by
              #6

              It doesnt have to be gmaps, just any maptool would be fine, if it works on the mobile plattforms like android.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                treo
                wrote on 4 Sept 2013, 08:43 last edited by
                #7

                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.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DerMas
                  wrote on 4 Sept 2013, 08:55 last edited by
                  #8

                  Thanks, I will give it a try, but I think I am going to have a hard time to add this external lib to the android deployment process.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    treo
                    wrote on 4 Sept 2013, 09:02 last edited by
                    #9

                    If you get it to work, please report back how you did it :)

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      chrisadams
                      wrote on 5 Sept 2013, 00:24 last edited by
                      #10

                      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.0

                      WebView {
                      url: "http://maps.google.com"
                      }
                      @

                      Cheers,
                      Chris.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        amccarthy
                        wrote on 5 Sept 2013, 01:30 last edited by
                        #11

                        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/

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DerMas
                          wrote on 5 Sept 2013, 08:12 last edited by
                          #12

                          So waiting for QT 5.2 and becoming familiar with the qt location module seems to be the way to go :)

                          @Chris
                          WebView doesnt work on mobile devices yet.

                          1 Reply Last reply
                          0

                          1/12

                          3 Sept 2013, 10:52

                          • Login

                          • Login or register to search.
                          1 out of 12
                          • First post
                            1/12
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved