Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.2, 5.10.0 Beta 1
-
None
Description
The following code draws a polygon with 2 points. The resulting line is visible with the osm plugin, but not with the mapboxgl plugin.
import QtQuick 2.8 import QtQuick.Window 2.2 import QtPositioning 5.8 import QtLocation 5.9 Window { visible: true width: 640 height: 480 Map { id: theMap anchors.fill: parent plugin: Plugin { // name: "osm" name: "mapboxgl" // PluginParameter { name: "mapboxgl.mapping.use_fbo"; value: "false" } // PluginParameter { name: "mapboxgl.mapping.items.insert_before"; value: "false" } } center: QtPositioning.coordinate(60,10); Timer { property double counter: 0 interval: 16 repeat: true running: true triggeredOnStart: true onTriggered: { counter = counter + 0.01; var path = thePolygon.path; path[1] = QtPositioning.coordinate(60.0+Math.sin(counter), 10.0+Math.cos(counter)); thePolygon.path = path theMap.center = path[1]; } } MapPolygon { id: thePolygon path: [ { latitude: 60, longitude: 10 }, { latitude: 60.5, longitude: 10 }, ] color: "#11223344" border.color: "blue" border.width: 2 } } }