summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/location/geojson_viewer/GeoJsonDelegate.qml11
1 files changed, 11 insertions, 0 deletions
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)
+ }
+ }
}
}