summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-21 12:31:47 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-26 22:24:50 +0200
commitfdbbfa4a6723b816478ee011ab4098e5332dc2f5 (patch)
tree6e6d6a68f7edf0ec5ee85495d316d1ff34bbee71 /tests
parenta94cefd446dd192172f47f183b56bbb719e95ee4 (diff)
downloadqtlocation-fdbbfa4a6723b816478ee011ab4098e5332dc2f5.tar.gz
Remove MapObjects from labs
The feature was designed to enable map backends to implement their own rendering of the map, and map items. It was never really used by any of the backends we supported, and introduced a lot of complexity to the code base. The idea as such has perhaps merit, but for now we focus on the basic functionality of Qt Location. Support for Qt Location when the Qt Quick scene graph is not used is not a part of that. Change-Id: I08e460043a0bd2600bad79b6ce2bb18e40e19eb6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/mapobjects_tester/main.qml165
1 files changed, 3 insertions, 162 deletions
diff --git a/tests/manual/mapobjects_tester/main.qml b/tests/manual/mapobjects_tester/main.qml
index 3651a382..b5c6218a 100644
--- a/tests/manual/mapobjects_tester/main.qml
+++ b/tests/manual/mapobjects_tester/main.qml
@@ -74,52 +74,7 @@ Window {
id: map
rotation: win.rotation
gesture.enabled: true
- objectName: "map1"
- anchors {
- bottom: parent.bottom
- top: parent.top
- left: parent.left
- right: parent.horizontalCenter
- }
-
- onCenterChanged: syncMaps(map, map2, "center")
- onTiltChanged: syncMaps(map, map2, "tilt")
- onBearingChanged: syncMaps(map, map2, "bearing")
- onZoomLevelChanged: syncMaps(map, map2, "zoomLevel")
- onFieldOfViewChanged: syncMaps(map, map2, "fieldOfView")
-
- opacity: 1.0
- color: 'transparent'
- plugin: osm
- center: initialCenter
- activeMapType: map.supportedMapTypes[2]
- zoomLevel: initialZL
- z : parent.z + 1
- copyrightsVisible: false
-
- Component.onCompleted: {
- var o = movComponent.createObject(map1MainMOV)
- map1MainMOV.addMapObject(o);
- }
- MapObjectView {
- id: map1MainMOV
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: (mouse) => {
- mouse.accepted = false
- var crd = map.toCoordinate(Qt.point(mouse.x, mouse.y))
- var s = crd.toString(0)
- console.log("Clicked on ",s)
- }
- }
- }
- Map {
- id: map2
- rotation: win.rotation
- gesture.enabled: true
- objectName: "map2"
+ objectName: "map"
anchors {
bottom: parent.bottom
top: parent.top
@@ -127,12 +82,6 @@ Window {
right: parent.right
}
- onCenterChanged: syncMaps(map2, map, "center")
- onTiltChanged: syncMaps(map2, map, "tilt")
- onBearingChanged: syncMaps(map2, map, "bearing")
- onZoomLevelChanged: syncMaps(map2, map, "zoomLevel")
- onFieldOfViewChanged: syncMaps(map2, map, "fieldOfView")
-
color: 'transparent'
plugin: osm
activeMapType: map.supportedMapTypes[2]
@@ -141,12 +90,12 @@ Window {
copyrightsVisible: false
Component.onCompleted: {
- var o = migComponent.createObject(map2)
+ var o = migComponent.createObject(map)
o.glPolygons = Qt.binding(function() {return switchPolygons2.checked})
o.glPolylines = Qt.binding(function() {return switchPolylines2.currentText})
o.glCircles = Qt.binding(function() {return switchCircles2.checked})
o.glRectangles = Qt.binding(function() {return switchRectangles2.checked})
- map2.addMapItemGroup(o);
+ map.addMapItemGroup(o);
}
C2.Switch {
@@ -403,114 +352,6 @@ Window {
}
}
- Component {
- id: movComponent
- MapObjectView {
- id: polyGroup
- MapPolylineObject {
- id: tstPolyLine // to verify the polygon stays where it's supposed to
- line.color: 'black'
- objectName: parent.objectName + "black"
- line.width: 1
- path: [
- { latitude: 76.9965, longitude: -175.012 },
- { latitude: 26.9965, longitude: -175.012 }
- ]
- }
-
- MapPolylineObject {
- id: timeline
- line.color: "red"
- objectName: parent.objectName + "timeline"
- line.width: 4
- path: [
- { latitude: 90, longitude: 180 },
- { latitude: -90, longitude: -180 }
- ]
- }
-
- MapPolygonObject {
- id: poly1
- color: "red"
- objectName: parent.objectName + "red"
- path: [
- { latitude: 55, longitude: 170 },
- { latitude: 66.9965, longitude: -175.012 },
- { latitude: 55, longitude: -160 },
- { latitude: 40, longitude: -165 },
- { latitude: 45, longitude: 178 }
- ]
- }
-
- MapPolygonObject {
- id: selfIntersectingPolygon
- color: 'darkmagenta'
- objectName: parent.objectName + "darkmagenta"
- path: [
- { latitude: 19, longitude: 49 },
- { latitude: 18, longitude: 49 },
- { latitude: 18, longitude: 51 },
- { latitude: 20, longitude: 51 },
- { latitude: 20, longitude: 50 },
- { latitude: 18.5, longitude: 50 },
- { latitude: 18.5, longitude: 52 },
- { latitude: 19, longitude: 52 }
- ]
- }
-
- MapPolygonObject {
- id: poly2
- color: "green"
- border.color: "black"
- border.width: 8
- objectName: parent.objectName + "green"
- path: [
- { latitude: -45, longitude: -170 },
- { latitude: -55, longitude: -155 },
- { latitude: -45, longitude: -130 },
- { latitude: -35, longitude: -155 }
- ]
- }
-
- MapPolygonObject {
- id: poly3
- color: Qt.rgba(0, 191.0/255.0, 1, 0.3) //"deepskyblue"
- objectName: parent.objectName + "deepskyblue"
- path: [
- { latitude: 65, longitude: -20 },
- { latitude: 75, longitude: 140 },
- { latitude: 65, longitude: 80 },
- { latitude: 55, longitude: -30 }
- ]
- }
-
- MapCircleObject {
- center: QtPositioning.coordinate(52, 0)
- radius: sliRadius.value
- color: 'deepskyblue'
- border.width: 6
- border.color: 'firebrick'
- }
-
- MapPolylineObject {
- id: longPolyline
- line.color: "firebrick"
- objectName: parent.objectName + "longPolyline"
- line.width: 10
- path: longPolyPath
- }
-
- MapCircleObject {
- id: circle1
- border.color: 'deepskyblue'
- border.width: 26
- center: QtPositioning.coordinate(17, 44);
- radius: 200*1000
- color: "firebrick"
- }
- }
- }
-
property var longPolyPath
C2.Slider {