summaryrefslogtreecommitdiff
path: root/examples/location/mapviewer/content/map/Marker.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/location/mapviewer/content/map/Marker.qml')
-rw-r--r--examples/location/mapviewer/content/map/Marker.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/location/mapviewer/content/map/Marker.qml b/examples/location/mapviewer/content/map/Marker.qml
index d7a1e838..ece34819 100644
--- a/examples/location/mapviewer/content/map/Marker.qml
+++ b/examples/location/mapviewer/content/map/Marker.qml
@@ -57,7 +57,7 @@ MapQuickItem {
id: image
//! [mqi-anchor]
source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "../../resources/marker_selected.png" :"../../resources/marker_hovered.png") : "../../resources/marker.png"
- MapMouseArea {
+ MouseArea {
id: markerMouseArea
property int pressX : -1
property int pressY : -1
@@ -108,7 +108,8 @@ MapQuickItem {
}
//! [mqi-closeimage]
- Component.onCompleted: coordinate = mouseArea.lastCoordinate
+ Component.onCompleted: coordinate = map.toCoordinate(Qt.point(markerMouseArea.mouseX,
+ markerMouseArea.mouseY));
//! [mqi-close]
}
//! [mqi-close]