diff options
Diffstat (limited to 'examples/location/mapviewer/map/CircleItem.qml')
-rw-r--r-- | examples/location/mapviewer/map/CircleItem.qml | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/examples/location/mapviewer/map/CircleItem.qml b/examples/location/mapviewer/map/CircleItem.qml index e647d248..a5cae752 100644 --- a/examples/location/mapviewer/map/CircleItem.qml +++ b/examples/location/mapviewer/map/CircleItem.qml @@ -3,19 +3,26 @@ import QtQuick import QtLocation -//TODO: remove/refactor me when items are integrated - MapCircle { - color: "#46a2da" - border.color: "#190a33" + color: "#da5546" + border.color: "#330a0a" border.width: 2 smooth: true - opacity: 0.25 + opacity: 0.75 + + function setGeometry(anchorCoordinate) { + center = anchorCoordinate + } + + function addGeometry(newCoordinate, changeLast){ + radius = center.distanceTo(newCoordinate) + return true + } - function setGeometry(markers, index){ - center.latitude = markers[index].coordinate.latitude - center.longitude = markers[index].coordinate.longitude - radius= center.distanceTo(markers[index + 1].coordinate) + function finishAddGeometry(){ + color = "#46a2da" + border.color = "#190a33" + opacity = 0.25 } } |