/***************生成飞机图标**********************/
//这个飞机图标
MapQuickItem{
z:100
//指示的坐标点
coordinate: QtPositioning.coordinate(helicopter_qml.c_lat,helicopter_qml.c_longti)
//sourceItem左上角相对于coordinate的偏移
anchorPoint: Qt.point(sourceItem.width/2,sourceItem.height/2)
//Qt Quick对象
sourceItem: Image {
id: ima
visible: true
width: 60
height: 60
source: "qrc:/new/prefix1/ui/res/image/helicopter.png"
Rectangle{
id:rect_alarm
anchors.left: ima.left
anchors.top:ima.bottom
color: "transparent"
opacity: 0.8
radius: 10
width: 180
height: 220
border.color: '#fe0404'
border.width: 3
Text {
id: showAlarmInfo
property var air_alarm_info
property var alarm_info_font_color
anchors.left:parent.left
anchors.top: parent.top
anchors.right: parent.right
// anchors.bottom: parent.bottom
anchors.margins: 10
wrapMode:Text.WordWrap
text: air_alarm_info
//红色 "185 175 15"
//黑色 "#000000"
//黄色 "#fff200"
color:alarm_info_font_color
font {
family: "Arial" // 设置字体家族
pointSize: 12 // 设置字体大小
weight: Font.Bold // 设置字体粗细
italic: false // 设置斜体
}
}
Text {
id: showAlarmInfo2
property var text_name:helicopter_qml.helicopter_name
property var text_long:helicopter_qml.longtitude
property var text_lati:helicopter_qml.latitude
property var text_height:helicopter_qml.helicopter_height
anchors.left:showAlarmInfo.left
anchors.top: showAlarmInfo.bottom
anchors.right: showAlarmInfo.right
anchors.bottom: rect_alarm.bottom
// anchors.margins: 10
wrapMode:Text.WordWrap
text: "机号:"+text_name+"\n"+
"经度:"+text_long+"\n"+
"纬度:"+text_lati+"\n"+
"飞行高度:"+text_height+"\n"+
"飞行速度:"+55.60+"\n"
//黑色
color: "#000000"
font {
family: "Arial" // 设置字体家族
pointSize: 12 // 设置字体大小
weight: Font.Bold // 设置字体粗细
italic: false // 设置斜体
}
}
}
}
}
07-04
1501
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)