diff options
author | Alex Wilson <alex.wilson@nokia.com> | 2011-12-28 15:49:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-28 07:42:03 +0100 |
commit | 0960ad6b4ee2ac6e66f5ce06a395547cd7f34243 (patch) | |
tree | 2e4d1efeb42db6936f523c89efcc31aa2543d2b4 /examples | |
parent | fe129bd8cbbfd8e411c5fe39059f9f062ab3375e (diff) | |
download | qtlocation-0960ad6b4ee2ac6e66f5ce06a395547cd7f34243.tar.gz |
Adding some docs for basic QML map items that have none
Docs for MapCircle, MapQuickItem, MapRectangle and MapRoute, as well
as improvements to MapPolygon so that it appears in the list.
Change-Id: I71e659f65ad3fe467893136acbec71db87f5ede5
Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/mapviewer/content/map/Marker.qml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/declarative/mapviewer/content/map/Marker.qml b/examples/declarative/mapviewer/content/map/Marker.qml index 43e22920..e1686ab9 100644 --- a/examples/declarative/mapviewer/content/map/Marker.qml +++ b/examples/declarative/mapviewer/content/map/Marker.qml @@ -42,17 +42,22 @@ import QtQuick 2.0; import QtLocation 5.0 import QtLocation.examples 5.0 -MapQuickItem { //to be used inside MapComponent only +//! [mqi-top] +MapQuickItem { id: marker +//! [mqi-top] property alias lastMouseX: markerMouseArea.lastX property alias lastMouseY: markerMouseArea.lastY + +//! [mqi-anchor] anchorPoint.x: image.width/4 anchorPoint.y: image.height coordinate: Coordinate { latitude : 0; longitude : 0 } - sourceItem: Image { + sourceItem: Image { id: image +//! [mqi-anchor] source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "../../resources/marker_selected.png" :"../../resources/marker_hovered.png") : "../../resources/marker.png" MapMouseArea { id: markerMouseArea @@ -95,10 +100,14 @@ MapQuickItem { //to be used inside MapComponent only } } +//! [mqi-closeimage] } +//! [mqi-closeimage] Component.onCompleted: { coordinate.longitude = mouseArea.lastCoordinate.longitude coordinate.latitude = mouseArea.lastCoordinate.latitude } +//! [mqi-close] } +//! [mqi-close] |