Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.0, 5.7.0
-
None
-
Desktop/Mobile/Embedded
Description
When attempting to use a custom OSM map server, the documentation at http://doc.qt.io/qt-5/location-plugin-osm.html suggests that the Map::activeMapType property needs to be set to MapType.CustomMap. This results in an error "Unable to assign int to QDeclarativeGeoMapType*" as Map::activeMapType is of type MapType and the enumeration entry is an integer.
Instead, the Map::activeMapType can be set to one of the Map::supportedMapTypes. That said, it seems you have to iterate through them to find the object with the qtlocation source-found name "Custom URL Map".
I'm not sure if there's a QML element that normally hides all this, but could the documentation be updated to include
requires that Map::activeMapType be assigned to one of the Map::supportedMapTypes whose name matches "Custom URL Map"
?
Reference discussion:
https://forum.qt.io/topic/69327/qml-maps/7