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. Open source map plug in for QML
Forum Updated to NodeBB v4.3 + New Features

Open source map plug in for QML

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
34 Posts 7 Posters 17.8k Views 3 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.
  • T Offline
    T Offline
    TonyN
    wrote on last edited by
    #7

    Nevermind, I solved the problem.

    1 Reply Last reply
    0
    • V vladstelmahovsky

      @michaelL you cat take a look at my plugins here https://github.com/vladest

      T Offline
      T Offline
      TonyN
      wrote on last edited by
      #8

      @vladstelmahovsky Your plugin works really cool though. I probably will look into source code and make my own to load map locally from file or database

      V 1 Reply Last reply
      0
      • T TonyN

        @vladstelmahovsky Your plugin works really cool though. I probably will look into source code and make my own to load map locally from file or database

        V Offline
        V Offline
        vladstelmahovsky
        wrote on last edited by vladstelmahovsky
        #9

        @TonyN actually, QtLocation itself handles caching of the data and you can provide your own cache mechanisms, afaik

        1 Reply Last reply
        2
        • michaelLM Offline
          michaelLM Offline
          michaelL
          wrote on last edited by
          #10

          @TonyN

          where did you found this file "libqtgeoservices_googlemaps.so" and the "plugins" folder?
          I couldnt fin any plugins folder on the Qt installation directory.

          1 Reply Last reply
          0
          • michaelLM Offline
            michaelLM Offline
            michaelL
            wrote on last edited by
            #11

            @TonyN i found one plugins folder here C:\Qt\5.6\mingw49_32\plugins\geoservices
            But inside there is only .dll files.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #12

              @michaelL you have to build and install the plugin yourself.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • michaelLM Offline
                michaelLM Offline
                michaelL
                wrote on last edited by
                #13

                @SGaist so i build it and install it insite mingw32:

                qmake googlemaps.pro
                mingw32-make
                mingw32-make install

                And when i ran the example the plugin was there but the map didnt came up and gave me this erro message:
                QGeoTileRequestManager: Failed to fetch tile (543,298,10) 5 times, giving up. Last error message was: 'Set googlemaps.maps.apikey with google maps application key, supporting static maps'

                Any idea?

                V 1 Reply Last reply
                0
                • michaelLM Offline
                  michaelLM Offline
                  michaelL
                  wrote on last edited by
                  #14

                  @vladstelmahovsky i saw you had the same issue.
                  i generate my google api key now but i dont know where to put it.
                  How did you solve it?

                  1 Reply Last reply
                  0
                  • michaelLM michaelL

                    @SGaist so i build it and install it insite mingw32:

                    qmake googlemaps.pro
                    mingw32-make
                    mingw32-make install

                    And when i ran the example the plugin was there but the map didnt came up and gave me this erro message:
                    QGeoTileRequestManager: Failed to fetch tile (543,298,10) 5 times, giving up. Last error message was: 'Set googlemaps.maps.apikey with google maps application key, supporting static maps'

                    Any idea?

                    V Offline
                    V Offline
                    vladstelmahovsky
                    wrote on last edited by
                    #15

                    @michaelL well, have you added PluginParameter {} to your google Plugin {} instance with googlemaps.maps.apikey ?

                    1 Reply Last reply
                    0
                    • michaelLM Offline
                      michaelLM Offline
                      michaelL
                      wrote on last edited by
                      #16

                      @vladstelmahovsky no where do i set this parameter? On the plugin or on the mapviewer example?

                      V 1 Reply Last reply
                      0
                      • michaelLM michaelL

                        @vladstelmahovsky no where do i set this parameter? On the plugin or on the mapviewer example?

                        V Offline
                        V Offline
                        vladstelmahovsky
                        wrote on last edited by
                        #17

                        @michaelL in the mapviewer. something like this:
                        Plugin {
                        id: gmapsPlugin
                        name: "googlemaps"
                        locales: "en_EN"
                        PluginParameter {
                        name: "googlemaps.useragent"
                        value: "<your user agent>"
                        }
                        PluginParameter {
                        name: "googlemaps.route.apikey"
                        value: "<put your api key here>"
                        }
                        PluginParameter {
                        name: "googlemaps.maps.apikey"
                        value: "<put your api key here>"
                        }
                        PluginParameter {
                        name: "googlemaps.maps.tilesize"
                        value: "256"
                        }
                        }

                        1 Reply Last reply
                        1
                        • michaelLM Offline
                          michaelLM Offline
                          michaelL
                          wrote on last edited by
                          #18

                          @vladstelmahovsky On the mapviewer example i tryied on the QML File:

                          Plugin{
                          id: myPlugin
                          name: "googlemaps"
                          PluginParameter { name: "googlemaps.maps.apikey "; value: "https://maps.googleapis.com/maps/api/js?key=.............; }
                          }

                          Where "......" my googlemap key is.

                          But it didnt worked.

                          V 1 Reply Last reply
                          0
                          • michaelLM michaelL

                            @vladstelmahovsky On the mapviewer example i tryied on the QML File:

                            Plugin{
                            id: myPlugin
                            name: "googlemaps"
                            PluginParameter { name: "googlemaps.maps.apikey "; value: "https://maps.googleapis.com/maps/api/js?key=.............; }
                            }

                            Where "......" my googlemap key is.

                            But it didnt worked.

                            V Offline
                            V Offline
                            vladstelmahovsky
                            wrote on last edited by
                            #19

                            @michaelL value shold be ONLY api key. not full url. just api key

                            1 Reply Last reply
                            0
                            • michaelLM Offline
                              michaelLM Offline
                              michaelL
                              wrote on last edited by
                              #20

                              @vladstelmahovsky I tryied the api key only but i got the same error.
                              Did you do anything else?

                              V 1 Reply Last reply
                              0
                              • michaelLM michaelL

                                @vladstelmahovsky I tryied the api key only but i got the same error.
                                Did you do anything else?

                                V Offline
                                V Offline
                                vladstelmahovsky
                                wrote on last edited by
                                #21

                                @michaelL no, I didnot, but the error above indicated that the key was not set. Since you have soreces, you can add debug messages to see where the problem is

                                1 Reply Last reply
                                0
                                • michaelLM Offline
                                  michaelLM Offline
                                  michaelL
                                  wrote on last edited by
                                  #22

                                  @vladstelmahovsky the Plugin parameter is not working on the mapviewer.qml and i added this line in main.c and it works:
                                  parameters.insert("googlemaps.maps.apikey", "<your API Key>");

                                  V 1 Reply Last reply
                                  0
                                  • michaelLM michaelL

                                    @vladstelmahovsky the Plugin parameter is not working on the mapviewer.qml and i added this line in main.c and it works:
                                    parameters.insert("googlemaps.maps.apikey", "<your API Key>");

                                    V Offline
                                    V Offline
                                    vladstelmahovsky
                                    wrote on last edited by
                                    #23

                                    @michaelL where you have created your QtLocation plugin instance? c++ or QML?

                                    1 Reply Last reply
                                    0
                                    • michaelLM Offline
                                      michaelLM Offline
                                      michaelL
                                      wrote on last edited by
                                      #24

                                      @vladstelmahovsky i got it to work with the placemap example under QML:
                                      Plugin {
                                      id: myPlugin
                                      name: "googlemaps"
                                      //specify plugin parameters if necessary
                                      //PluginParameter {...}
                                      //PluginParameter {...}
                                      //...
                                      PluginParameter { name:"googlemaps.maps.apikey"; value: "<your api key>"}
                                      }

                                      Map {
                                          id: map
                                          anchors.fill: parent
                                          plugin: myPlugin;
                                          zoomLevel: 13
                                          activeMapType: supportedMapTypes[1]
                                      }
                                      

                                      Do you know how can i add the openseamap marks as an overlay on your plugin?
                                      Here is the wiki site http://wiki.openseamap.org/wiki/OpenSeaMap-dev:Server
                                      and here is the tile server for sea marks:
                                      Sea Marks alpha.openseamap.org http://t1.openseamap.org/seamark/{z}/{x}/{y}.png

                                      Any idea?

                                      V 1 Reply Last reply
                                      0
                                      • michaelLM michaelL

                                        @vladstelmahovsky i got it to work with the placemap example under QML:
                                        Plugin {
                                        id: myPlugin
                                        name: "googlemaps"
                                        //specify plugin parameters if necessary
                                        //PluginParameter {...}
                                        //PluginParameter {...}
                                        //...
                                        PluginParameter { name:"googlemaps.maps.apikey"; value: "<your api key>"}
                                        }

                                        Map {
                                            id: map
                                            anchors.fill: parent
                                            plugin: myPlugin;
                                            zoomLevel: 13
                                            activeMapType: supportedMapTypes[1]
                                        }
                                        

                                        Do you know how can i add the openseamap marks as an overlay on your plugin?
                                        Here is the wiki site http://wiki.openseamap.org/wiki/OpenSeaMap-dev:Server
                                        and here is the tile server for sea marks:
                                        Sea Marks alpha.openseamap.org http://t1.openseamap.org/seamark/{z}/{x}/{y}.png

                                        Any idea?

                                        V Offline
                                        V Offline
                                        vladstelmahovsky
                                        wrote on last edited by
                                        #25

                                        @michaelL I suppose, you have or to implement your own plugin for seamaps or try to use OSM plugin providing seamaps as a base

                                        1 Reply Last reply
                                        0
                                        • michaelLM Offline
                                          michaelLM Offline
                                          michaelL
                                          wrote on last edited by
                                          #26

                                          @vladstelmahovsky do you have any idea on how to set your googlemap plug in with iOS/Android?
                                          I followed this steps but i got an error by installing the Podfile:
                                          https://developers.google.com/maps/documentation/ios-sdk/start

                                          Did you have any success on a mobile application?

                                          V 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