mapboxgl dont work on raspberry pi
-
hi guys i crosscompile Qt on raspberry pi with Ubuntu and i want to make a map with Qml and this is my code:
Map { id:map anchors.fill: parent plugin: Plugin{ id:myplug name:"mapboxgl" PluginParameter{ name: "mapboxgl.access_token" value:"pk.eyJ1IjoibWlsYWRsb3ZlYm90aCIsImEiOiJjanZiaHlrZXEwczF5NDRxZnp0cnFseG9jIn0.CZjNPyoSnkUG4NaEzvb36A" } } zoomLevel: 12 activeMapType: map.supportedMapTypes[map.supportedMapTypes.length-1] center: QtPositioning.coordinate(34.08, 49.70) onSupportedMapTypesChanged: { for(var i=0; i<=map.supportedMapTypes.length-1; i++){ console.log(i+":"+map.supportedMapTypes[i].name) } } onErrorChanged: { console.log(map.error) } }
and when i run it on ubuntu with GCC (5.7) every thing is ok l.
OutPut log:qml: 0:mapbox://styles/mapbox/streets-v10 qml: 1:mapbox://styles/mapbox/basic-v9 qml: 2:mapbox://styles/mapbox/bright-v9 qml: 3:mapbox://styles/mapbox/outdoors-v10 qml: 4:mapbox://styles/mapbox/satellite-v9 qml: 5:mapbox://styles/mapbox/satellite-streets-v10 qml: 6:mapbox://styles/mapbox/light-v9 qml: 7:mapbox://styles/mapbox/dark-v9 qml: 8:mapbox://styles/mapbox/navigation-preview-day-v2 qml: 9:mapbox://styles/mapbox/navigation-preview-night-v2 qml: 10:mapbox://styles/mapbox/navigation-guidance-day-v2 qml: 11:mapbox://styles/mapbox/navigation-guidance-night-v2 Threaded rendering is not optimal in the Mapbox GL plugin. [ INFO ] "{QSGRenderThread}[General]: GPU Identifier: SVGA3D; build: RELEASE; LLVM;"
but when i deployed on my raspberry pi i get nothing i got just a white screen and OutPut log is:
qml: 1 qrc:/main.qml:27:9: Unable to assign [undefined] to QDeclarativeGeoMapType*
the raspberry GCC version is 8.3.0.
so whats my wrong? help me soon as possible please. -
i change this line
console.log(map.error)
to this
console.log(map.errorString")
and i got error on string that says:
qml: The geoservices provider is not supported.
so i write this function to check which map provider are avaible for me on raspberry and i got this logs when i deployed on Rpi:
function checkPlugins() { var plugins = Qt.createQmlObject ('import QtLocation 5.12; Plugin {}', mainwin) for (var i = 0; i<plugins.availableServiceProviders.length; i++) { var newPlugin = Qt.createQmlObject ('import QtLocation 5.12; Plugin {name: "' + plugins.availableServiceProviders[i]+ '"}', mainwin) if (newPlugin.supportsMapping()){ console.log(newPlugin.name+" is Avaible.") } } }
and this logs is when i run on Ubuntu:
qml: esri is Avaible. qml: osm is Avaible. qml: mapbox is Avaible. qml: here is Avaible. qml: itemsoverlay is Avaible. qml: mapboxgl is Avaible.
so what can i do to add mapboxgl on my Rpi3
-
sorry guys i forgot to add the raspberry pi logs from checkPlugins so:
qml: here is Avaible. qml: itemsoverlay is Avaible. qml: osm is Avaible. qml: mapbox is Avaible. qml: esri is Avaible.
-
please help me guys i need it ):
-
@miladTalaei
Maybe it is problem with OpenGl support on RPI?