summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorLauri Laanmets <lauri.laanmets@eesti.ee>2022-03-08 09:36:28 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-26 14:28:46 +0200
commita59f72c77c71fa49bdef4cd0cef8aa4158b2a8ac (patch)
treed73c388a6bea30882f1dd417ff5d3886669c51be /examples
parent7504d62658da0ee8a3e376e5e6b9ecd4d6574848 (diff)
downloadqtlocation-a59f72c77c71fa49bdef4cd0cef8aa4158b2a8ac.tar.gz
Small improvements and fixes in different examples projects
All examples except 'places' are ported now and work as much as I could test manually. Task-number: QTBUG-96795 Pick-to: 6.2 Change-Id: Icebe6b1c222c68ee2a2881ae442b255360af2fae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/location/minimal_map/main.qml10
-rw-r--r--examples/location/places_list/places_list.qml4
-rw-r--r--examples/location/places_map/places_map.qml8
-rw-r--r--examples/location/planespotter/planespotter.qml2
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/location/minimal_map/main.qml b/examples/location/minimal_map/main.qml
index 285eb31e..92230f76 100644
--- a/examples/location/minimal_map/main.qml
+++ b/examples/location/minimal_map/main.qml
@@ -48,10 +48,10 @@
**
****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Window 2.14
-import QtLocation 5.6
-import QtPositioning 5.6
+import QtQuick
+import QtQuick.Window
+import QtLocation
+import QtPositioning
Window {
width: Qt.platform.os == "android" ? Screen.width : 512
@@ -60,7 +60,7 @@ Window {
Plugin {
id: mapPlugin
- name: "osm" // "mapboxgl", "esri", ...
+ name: "osm" // "maplibregl", "esri", ...
// specify plugin parameters if necessary
// PluginParameter {
// name:
diff --git a/examples/location/places_list/places_list.qml b/examples/location/places_list/places_list.qml
index 01c2e15e..ac3c2858 100644
--- a/examples/location/places_list/places_list.qml
+++ b/examples/location/places_list/places_list.qml
@@ -77,7 +77,7 @@ Rectangle {
plugin: myPlugin
searchTerm: "pizza"
- searchArea: QtPositioning.circle(startCoordinate);
+ searchArea: QtPositioning.circle(startCoordinate, 500000 /* 5 km radius */);
Component.onCompleted: update()
@@ -103,7 +103,7 @@ Rectangle {
Connections {
target: searchModel
- onStatusChanged: {
+ function onStatusChanged() {
if (searchModel.status == PlaceSearchModel.Error)
console.log(searchModel.errorString());
}
diff --git a/examples/location/places_map/places_map.qml b/examples/location/places_map/places_map.qml
index c2a7882a..66fcab18 100644
--- a/examples/location/places_map/places_map.qml
+++ b/examples/location/places_map/places_map.qml
@@ -60,7 +60,7 @@ Rectangle {
//! [Initialize Plugin]
Plugin {
id: myPlugin
- name: "osm" // "mapboxgl", "esri", ...
+ name: "osm" // "maplibregl", "esri", ...
//specify plugin parameters if necessary
//PluginParameter {...}
//PluginParameter {...}
@@ -97,7 +97,7 @@ Rectangle {
plugin: myPlugin
searchTerm: "Pizza"
- searchArea: QtPositioning.circle(locationOslo)
+ searchArea: QtPositioning.circle(locationOslo, 500000 /* 5 km radius */)
Component.onCompleted: update()
}
@@ -109,7 +109,7 @@ Rectangle {
anchors.fill: parent
plugin: myPlugin;
center: locationOslo
- zoomLevel: 13
+ zoomLevel: 5
MapItemView {
model: searchModel
@@ -130,7 +130,7 @@ Rectangle {
Connections {
target: searchModel
- onStatusChanged: {
+ function onStatusChanged() {
if (searchModel.status == PlaceSearchModel.Error)
console.log(searchModel.errorString());
}
diff --git a/examples/location/planespotter/planespotter.qml b/examples/location/planespotter/planespotter.qml
index e214008b..b0bdf2cf 100644
--- a/examples/location/planespotter/planespotter.qml
+++ b/examples/location/planespotter/planespotter.qml
@@ -72,7 +72,7 @@ Window {
anchors.centerIn: parent;
anchors.fill: parent
plugin: Plugin {
- name: "osm" // "mapboxgl", "esri", ...
+ name: "osm" // "maplibregl", "esri", ...
}
Plane {