From 1bba966b8df1cc1d39276833ff4533f967df247e Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 18 Dec 2019 22:11:38 +0100 Subject: Add to GeoJsonDelegate.qml support for logging clicked country Change-Id: I15f7cae7efc58279d76e9ac7d0be3b7fd63ae1cd Reviewed-by: Alex Blasche --- examples/location/geojson_viewer/GeoJsonDelegate.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/location/geojson_viewer/GeoJsonDelegate.qml b/examples/location/geojson_viewer/GeoJsonDelegate.qml index d3e8db93..ff0fbffa 100644 --- a/examples/location/geojson_viewer/GeoJsonDelegate.qml +++ b/examples/location/geojson_viewer/GeoJsonDelegate.qml @@ -98,6 +98,17 @@ DelegateChooser { opacity: dc.defaultOpacity color: (props && props.color) || (parent && parent.props && parent.props.color) || dc.defaultColor border.width: 0 + MouseArea { + anchors.fill: parent + onClicked: { + if (props !== undefined) + console.log(props.name) + else if (parent.parent.geojsonType == "MultiPolygon") + console.log(parent.parent.props.name) + else + console.log("NO NAME!", props) + } + } } } -- cgit v1.2.1