Open source map plug in for QML
-
@michaelL you cat take a look at my plugins here https://github.com/vladest
@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
-
@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
@TonyN actually, QtLocation itself handles caching of the data and you can provide your own cache mechanisms, afaik
-
@SGaist so i build it and install it insite mingw32:
qmake googlemaps.pro
mingw32-make
mingw32-make installAnd 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?
-
@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? -
@SGaist so i build it and install it insite mingw32:
qmake googlemaps.pro
mingw32-make
mingw32-make installAnd 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?
@michaelL well, have you added PluginParameter {} to your google Plugin {} instance with googlemaps.maps.apikey ?
-
@vladstelmahovsky no where do i set this parameter? On the plugin or on the mapviewer example?
-
@vladstelmahovsky no where do i set this parameter? On the plugin or on the mapviewer example?
@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"
}
} -
@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.
-
@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.
@michaelL value shold be ONLY api key. not full url. just api key
-
@vladstelmahovsky I tryied the api key only but i got the same error.
Did you do anything else? -
@vladstelmahovsky I tryied the api key only but i got the same error.
Did you do anything else?@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
-
@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>"); -
@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>");@michaelL where you have created your QtLocation plugin instance? c++ or QML?
-
@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}.pngAny idea?
-
@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}.pngAny idea?
@michaelL I suppose, you have or to implement your own plugin for seamaps or try to use OSM plugin providing seamaps as a base
-
@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/startDid you have any success on a mobile application?