summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-02-03 14:29:52 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 04:38:30 +0100
commit202adba6230b6de21d333273eaefc44654802c9c (patch)
treefc82b1343a9fba5626d24c6ff2871505979809d7
parent0755e958b9c73b163df455d585aac022c48cc62b (diff)
Add new markers at touched location.
New markers added in the mapviewer example were being placed at the top left hand corner of the displayed map, just out of view. The user had to pan the map to see the newly added marker. Changed to position new markers at the location touched by the user to activate the context menu. Change-Id: If328e04cfd651a75fb91d599bedbd1129e761c7b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--examples/location/mapviewer/content/map/MapComponent.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/location/mapviewer/content/map/MapComponent.qml b/examples/location/mapviewer/content/map/MapComponent.qml
index 6d7d7baa..505c795a 100644
--- a/examples/location/mapviewer/content/map/MapComponent.qml
+++ b/examples/location/mapviewer/content/map/MapComponent.qml
@@ -971,6 +971,7 @@ Map {
var marker = Qt.createQmlObject ('Marker {}', map)
map.addMapItem(marker)
marker.z = map.z+1
+ marker.coordinate = mouseArea.lastCoordinate
//update list of markers
var myArray = new Array()