MapParameter QML
Solved
QML and Qt Quick
-
@Alien
untested:Map { id: map Component.onCompleted: { map.addMapParameter( MapParameter { ... } ); } }
-
@raven-worx ,
unfortunately it doesn't work!
Qt complains :
Expected token `)'
but I'm sure that I check the parenthesesComponent.onCompleted: { mapID.addMapParameter( MapParameter { type:"layer"; property var layerName: "this is my var"; } ); }
-
@Alien
sry, i always get trapped by the same mistake.
try the following:var param = Qt.createQmlObject('import QtQuick 2.2; \ MapParameter { \ type:"layer"; \ property var layerName: "this is my var"; \ }', parentId ); mapID.addMapParameter( param );
-
@raven-worx ,
Thanks for your solution.
Merely you forgot to addimport QtLocation 5.9;
into your code for MapParameter.
I appreciate your help.