Unsolved Unable to assign [undefined] to QDeclarativeGeoMapType*
-
Hi,
when I want to open my application that uses "osm" map, qtcreator throws this error (and also I have made a run able file on Linux using linuxdeployqt and the result is the same) .
Do you know what I'm missing?here is the code:
import QtQuick 2.7 import QtQuick.Window 2.2 import QtLocation 5.8 import QtPositioning 5.0 Window { id: win objectName: "window" visible: true width: 512 height: 512 Map { id: map anchors.fill: parent activeMapType: map.supportedMapTypes[8] zoomLevel: 1 plugin: Plugin { name: 'osm'; PluginParameter { name: 'osm.mapping.offline.directory' value: ':/offline_tiles/' } } } }
-
Are you sure
map.supportedMapTypes
has at least 9 elements? -
https://qt-blog-uploads.s3.amazonaws.com/wp-content/uploads/2017/05/OsmOffline.zip
I want to make an executable file from this example for test.
In it the map.supportedMapTypes is equal to 1. but I have tried all possible things.
https://doc.qt.io/qt-5/qml-qtlocation-maptype.html
here we can see the map types also. but I want to use the offline map and deploy may app to the customer. -
Hi @Jamshid did you solved the Problem already? I have the same issue.