Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to integrate Google Maps?

How to integrate Google Maps?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
25 Posts 11 Posters 26.2k Views
  • 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.
  • G Offline
    G Offline
    GTDev
    wrote on 1 Mar 2017, 11:28 last edited by GTDev 3 Jan 2017, 11:39
    #2

    Hi!
    Did you consider using a different map provider that is already supported by QML Maps as a plugin? (e.g. MapBox). It's possible to draw markers and work with the map directly from QML then (no WebView involved).

    You can also have a look at V-Play SDK for apps and games, which also offers a QML AppMap component with some additional built-in features like showing the user position on the map. There's also an open-source maps app demo available that you can use as a reference for your implementation.

    A simple map can be added for example like this:

     import VPlayApps 1.0
     import QtLocation 5.5
    
     App {
       NavigationStack {
    
         Page {
           title: "Map Example"
    
           // show the map
           AppMap {
             anchors.fill: parent
             plugin: Plugin {
               name: "mapbox"
               // configure your own map_id and access_token here
               parameters: [  PluginParameter {
                   name: "mapbox.map_id"
                   value: "mapbox.streets"
                 },
                 PluginParameter {
                   name: "mapbox.access_token"
                   value: "<you-mapbox-access-token>"
                 }]
             }
    
           }
         }
       }
     }
    

    Best,
    GT

    Senior Developer at Felgo - https://felgo.com/qt

    Develop mobile Apps for iOS & Android with Qt
    Felgo is an official Qt Technology Partner

    1 Reply Last reply
    1
    • K kd_wala
      1 Mar 2017, 04:36

      Hi everyone,
      I have plan to using Qt5 for building app for Mobile(Android, iOS)
      My app need using Google Map
      as I know, on Mobile should using QML (should not using Widget), so, if using QtWebEngine or QtWebkit but it not have support mobile,
      QtWebView support on mobile but not support much more (it just have funtion for loading html, run javascript) but we want to C++ interact with it ( Ex: when click on marker, C++ know this ...)
      So, pls suggest me what direction to using Google Map on Mobile with QML.
      Thanks

      V Offline
      V Offline
      vladstelmahovsky
      wrote on 1 Mar 2017, 15:13 last edited by
      #3

      @kd_wala here is a GoogleMaps plugin: https://github.com/vladest/googlemaps

      1 Reply Last reply
      2
      • K Offline
        K Offline
        kd_wala
        wrote on 2 Mar 2017, 01:32 last edited by
        #4

        @vladstelmahovsky , thanks for your suggest, i will checking this
        @GTDev , thanks for your suggest, but my app must using google map because other map provider not fit with my app requirement

        E 1 Reply Last reply 2 Mar 2017, 07:06
        1
        • K kd_wala
          2 Mar 2017, 01:32

          @vladstelmahovsky , thanks for your suggest, i will checking this
          @GTDev , thanks for your suggest, but my app must using google map because other map provider not fit with my app requirement

          E Offline
          E Offline
          ekkescorner
          Qt Champions 2016
          wrote on 2 Mar 2017, 07:06 last edited by
          #5

          @kd_wala let us know if the plugin is working well. Is your app a Qt Quick Controls2 app ?

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.8 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          1 Reply Last reply
          1
          • K Offline
            K Offline
            kd_wala
            wrote on 2 Mar 2017, 08:17 last edited by kd_wala 3 Feb 2017, 08:18
            #6

            @ekkescorner , Ok, I will check this and notify you,
            Yes, my app using Quick Control 2,
            my app is have some funtion that like grap, uber, so we need using google map.

            E 1 Reply Last reply 2 Mar 2017, 08:44
            2
            • K kd_wala
              2 Mar 2017, 08:17

              @ekkescorner , Ok, I will check this and notify you,
              Yes, my app using Quick Control 2,
              my app is have some funtion that like grap, uber, so we need using google map.

              E Offline
              E Offline
              ekkescorner
              Qt Champions 2016
              wrote on 2 Mar 2017, 08:44 last edited by
              #7

              @kd_wala said in QML Google Map for Mobile(Android, iOS):

              @ekkescorner , Ok, I will check this and notify you,

              thx

              Yes, my app using Quick Control 2,

              always good to see that more and more mobile apps are developed using QQC2 :)

              my app is have some funtion that like grap, uber, so we need using google map.

              looking forward to see this app in action

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.8 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              1 Reply Last reply
              2
              • K Offline
                K Offline
                kd_wala
                wrote on 6 Mar 2017, 15:43 last edited by
                #8

                @ekkescorner , I have just using googleMaps plugins that @vladstelmahovsky suggest ( https://github.com/vladest/googlemaps ), at first time, it work quite well, thanks for all support.

                E C 2 Replies Last reply 6 Mar 2017, 16:00
                2
                • K kd_wala
                  6 Mar 2017, 15:43

                  @ekkescorner , I have just using googleMaps plugins that @vladstelmahovsky suggest ( https://github.com/vladest/googlemaps ), at first time, it work quite well, thanks for all support.

                  E Offline
                  E Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote on 6 Mar 2017, 16:00 last edited by
                  #9

                  @kd_wala thx letting us know that it works

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                  5.15 --> 6.8 https://t1p.de/ekkeChecklist
                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                  1 Reply Last reply
                  1
                  • K kd_wala
                    6 Mar 2017, 15:43

                    @ekkescorner , I have just using googleMaps plugins that @vladstelmahovsky suggest ( https://github.com/vladest/googlemaps ), at first time, it work quite well, thanks for all support.

                    C Offline
                    C Offline
                    carles.sole.grau
                    wrote on 30 Mar 2017, 09:15 last edited by
                    #10

                    @kd_wala
                    Could you explain how that plugin is installed?
                    And how you implement it from QML?
                    Thank you very much.

                    1 Reply Last reply
                    1
                    • K Offline
                      K Offline
                      kd_wala
                      wrote on 30 Mar 2017, 09:58 last edited by
                      #11

                      @carles-sole-grau , When you done clone & build plugin, you should create folder 'geoservices' in same folder of file execute, then copy plugin into this 'geoservices' folder

                      You can see struct plugins in folder ( that why we have name 'geoservices') where you install Qt ex: '~/Qt5.8.0/5.8/gcc_64/plugins/ (I using Ubuntu & Qt5.8)

                      on QML you do like this:
                      Plugin {
                      id: mapPlugin
                      name: "googlemaps"
                      }

                      for tutorial how plugin, refer to example : http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html
                      for detail refer to doc: http://doc.qt.io/qt-5/plugins-howto.html

                      A 1 Reply Last reply 7 Sept 2018, 09:25
                      6
                      • S Offline
                        S Offline
                        seyed
                        wrote on 19 Apr 2017, 08:03 last edited by
                        #12

                        Build instruction:
                        1-Open project using QtCreator
                        2-Choose proper Build Kit and profile (for example debug profile)
                        3-Copy files manually or use terminal and run this command: make -f Makefile.Debug install or make -f Makefile.Release install if you choose release profile for building plugin.
                        4-Use plugin by setting googlemaps as name property of the Plugin Item. (for more information about using QtLocation and QtPositioning refer to Qt official documentation)

                        1 Reply Last reply
                        0
                        • TalklessT Offline
                          TalklessT Offline
                          Talkless
                          wrote on 20 Apr 2017, 10:24 last edited by Talkless
                          #13

                          @kd_wala I doubt using that QtLocation plugin can be considered legal, by the Terms and Conditions of Google Maps.

                          There was a dissucsion about using Google Maps not through their API's (JS, Java?), which looks like is not allowed. See comment:
                          https://bugreports.qt.io/browse/QTBUG-27304?focusedCommentId=300663&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-300663

                          Alternative is to use QtWebView and control official web-based Goole Maps through QtWebChannel, by creating JavaScript webocket connection from within WebView to your app.

                          Or, create QtWebView-like wrapper for native Java Gogole Maps components, just like QtWebView creates and manages native web view on different mobile OSes. There are limitations of course, as QML components will not be able to overdraw on top of these native components.

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            joshmarshall95
                            wrote on 8 Aug 2017, 14:29 last edited by
                            #14

                            @vladstelmahovsky can you tell me how to use the Geocode option? I need to be able to enter a postcode and then set the long and lat to that location

                            V 1 Reply Last reply 8 Aug 2017, 15:15
                            0
                            • J joshmarshall95
                              8 Aug 2017, 14:29

                              @vladstelmahovsky can you tell me how to use the Geocode option? I need to be able to enter a postcode and then set the long and lat to that location

                              V Offline
                              V Offline
                              vladstelmahovsky
                              wrote on 8 Aug 2017, 15:15 last edited by
                              #15

                              @joshmarshall95 just like any other QtLocation geocode API

                              bahman309B 1 Reply Last reply 24 Aug 2017, 07:44
                              0
                              • V vladstelmahovsky
                                8 Aug 2017, 15:15

                                @joshmarshall95 just like any other QtLocation geocode API

                                bahman309B Offline
                                bahman309B Offline
                                bahman309
                                wrote on 24 Aug 2017, 07:44 last edited by
                                #16

                                @vladstelmahovsky
                                hi,
                                thank you very much indeed ...
                                how to set traffic layer in the map?

                                V 1 Reply Last reply 24 Aug 2017, 08:08
                                0
                                • bahman309B bahman309
                                  24 Aug 2017, 07:44

                                  @vladstelmahovsky
                                  hi,
                                  thank you very much indeed ...
                                  how to set traffic layer in the map?

                                  V Offline
                                  V Offline
                                  vladstelmahovsky
                                  wrote on 24 Aug 2017, 08:08 last edited by
                                  #17

                                  @bahman309 I suppose as MapPolyline's if you have geo coordinates of traffic

                                  bahman309B 1 Reply Last reply 24 Aug 2017, 08:36
                                  0
                                  • V vladstelmahovsky
                                    24 Aug 2017, 08:08

                                    @bahman309 I suppose as MapPolyline's if you have geo coordinates of traffic

                                    bahman309B Offline
                                    bahman309B Offline
                                    bahman309
                                    wrote on 24 Aug 2017, 08:36 last edited by
                                    #18

                                    @vladstelmahovsky
                                    I want to use google traffic service

                                    V 1 Reply Last reply 24 Aug 2017, 08:38
                                    0
                                    • bahman309B bahman309
                                      24 Aug 2017, 08:36

                                      @vladstelmahovsky
                                      I want to use google traffic service

                                      V Offline
                                      V Offline
                                      vladstelmahovsky
                                      wrote on 24 Aug 2017, 08:38 last edited by
                                      #19

                                      @bahman309 I'm not aware about the service, sorry

                                      bahman309B 1 Reply Last reply 24 Aug 2017, 08:43
                                      0
                                      • V vladstelmahovsky
                                        24 Aug 2017, 08:38

                                        @bahman309 I'm not aware about the service, sorry

                                        bahman309B Offline
                                        bahman309B Offline
                                        bahman309
                                        wrote on 24 Aug 2017, 08:43 last edited by
                                        #20

                                        @vladstelmahovsky
                                        thank you...

                                        1 Reply Last reply
                                        0
                                        • bahman309B Offline
                                          bahman309B Offline
                                          bahman309
                                          wrote on 25 Aug 2017, 05:42 last edited by
                                          #21

                                          anybody used googlemaps plugin?
                                          anybody used navigation or traffic in QML?

                                          1 Reply Last reply
                                          0

                                          • Login

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