diff --git a/src/FlightMap/MapItems/VehicleMapItem.qml b/src/FlightMap/MapItems/VehicleMapItem.qml index b914ebfc42a1afb7d325b85267d2d723559fb1fb..b4c4d432a7fe1c71cf51fe74bd04114411a94443 100644 --- a/src/FlightMap/MapItems/VehicleMapItem.qml +++ b/src/FlightMap/MapItems/VehicleMapItem.qml @@ -57,6 +57,7 @@ MapQuickItem { } QGCMapLabel { + id: vehicleLabel anchors.top: parent.bottom anchors.horizontalCenter: parent.horizontalCenter map: _map @@ -66,10 +67,21 @@ MapQuickItem { property string vehicleLabelText: visible ? (_adsbVehicle ? - callsign + " " + QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString : + QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString : (_multiVehicle ? qsTr("Vehicle %1").arg(vehicle.id) : "")) : "" } + + QGCMapLabel { + anchors.top: vehicleLabel.bottom + anchors.horizontalCenter: parent.horizontalCenter + map: _map + text: vehicleLabelText + font.pointSize: ScreenTools.smallFontPointSize + visible: _adsbVehicle ? !isNaN(altitude) : _multiVehicle + + property string vehicleLabelText: visible && _adsbVehicle ? callsign : "" + } } }