diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-07-10 13:55:17 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-07-13 10:33:33 +0000 |
commit | a990d458f752aedb8b91aeafb4a62bb7c8ed4c50 (patch) | |
tree | 6cb8bc9ccaf4d55e9c3325029fb501f24800ab09 /examples/location/places_map | |
parent | 5e71363485b3760601544f6365b039ef3b986123 (diff) | |
download | qtlocation-a990d458f752aedb8b91aeafb4a62bb7c8ed4c50.tar.gz |
Update places-list and places-map examples
Change position used in examples to Oslo. Update marker
icons to be the same as in mapviewer example.
Update screenshots, so they contain osm map.
Add marker icon to places_list, so it does not look so boring.
Add places title to places_map, so it is more readable.
Change-Id: Ia321aa8577e77f76468c504cd4e6ce877712089c
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location/places_map')
-rw-r--r-- | examples/location/places_map/marker.png | bin | 2341 -> 1051 bytes | |||
-rw-r--r-- | examples/location/places_map/places_map.pro | 2 | ||||
-rw-r--r-- | examples/location/places_map/places_map.qml | 22 | ||||
-rw-r--r-- | examples/location/places_map/places_map.qrc (renamed from examples/location/places_map/places_map_resource.qrc) | 0 |
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/location/places_map/marker.png b/examples/location/places_map/marker.png Binary files differindex 86ec960e..d5c698d1 100644 --- a/examples/location/places_map/marker.png +++ b/examples/location/places_map/marker.png diff --git a/examples/location/places_map/places_map.pro b/examples/location/places_map/places_map.pro index 140ddf44..51d61bbc 100644 --- a/examples/location/places_map/places_map.pro +++ b/examples/location/places_map/places_map.pro @@ -5,7 +5,7 @@ QT += quick qml network positioning location SOURCES = main.cpp RESOURCES += \ - places_map_resource.qrc + places_map.qrc target.path = $$[QT_INSTALL_EXAMPLES]/location/places_map INSTALLS += target diff --git a/examples/location/places_map/places_map.qml b/examples/location/places_map/places_map.qml index d59ac642..7ff3706a 100644 --- a/examples/location/places_map/places_map.qml +++ b/examples/location/places_map/places_map.qml @@ -40,13 +40,13 @@ //! [Imports] import QtQuick 2.0 -import QtPositioning 5.2 -import QtLocation 5.3 +import QtPositioning 5.5 +import QtLocation 5.5 //! [Imports] Rectangle { width: 360 - height: 360 + height: 640 //! [Initialize Plugin] Plugin { @@ -62,7 +62,7 @@ Rectangle { //! [Current Location] PositionSource { id: positionSource - property variant lastSearchPosition: locationBrisbane + property variant lastSearchPosition: locationOslo active: true updateInterval: 120000 // 2 mins onPositionChanged: { @@ -80,15 +80,15 @@ Rectangle { //! [Current Location] //! [PlaceSearchModel] - property variant locationBrisbane: QtPositioning.coordinate(-27.47, 153.025) + property variant locationOslo: QtPositioning.coordinate( 59.93, 10.76) + PlaceSearchModel { id: searchModel plugin: myPlugin searchTerm: "Pizza" - //initially show Brisbane - searchArea: QtPositioning.circle(locationBrisbane) + searchArea: QtPositioning.circle(locationOslo) Component.onCompleted: update() } @@ -99,7 +99,7 @@ Rectangle { id: map anchors.fill: parent plugin: myPlugin; - center: locationBrisbane + center: locationOslo zoomLevel: 13 MapItemView { @@ -110,9 +110,9 @@ Rectangle { anchorPoint.x: image.width * 0.5 anchorPoint.y: image.height - sourceItem: Image { - id: image - source: "marker.png" + sourceItem: Column { + Image { id: image; source: "marker.png" } + Text { text: title; font.bold: true } } } } diff --git a/examples/location/places_map/places_map_resource.qrc b/examples/location/places_map/places_map.qrc index 22395296..22395296 100644 --- a/examples/location/places_map/places_map_resource.qrc +++ b/examples/location/places_map/places_map.qrc |