// 添加自定义模型
addModel(lon, lat, name) {
var entity = this.viewer.entities.add({
message: '消防员信息',
name: name ,
// 108.947228, 34.260825
position: Cesium.Cartesian3.fromDegrees(parseFloat(lon), parseFloat(lat), 50),
model: {
url: '../../../../assets/CesiumAir/Cesium_Air.glb'
// uri: 'https://a.amap.com/jsapi_demos/static/gltf/Duck.gltf'
},
description: '<table><tr><th>区域</th><td> '+{{ this.name }}+' </td></tr>',
// description: '<table>\n' +
// '<tr>\n' +
// '\t<th>区域</th>\n' +
// '\t<td> + '{{ this.name }}' + </td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th>负责人</th>\t\n' +
// '\t<td>张三</td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th>归属中队</th>\t\n' +
// '\t<td>高新消防中队</td>\n' +
// '</tr><tr>\n' +
// '\t<th>成立时间</th>\t\n' +
// '\t<td>2020年3月2日</td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th style="right: calc()">初始化产品清单</th>\n' +
// '\t<td><button type="button">点击查看</button></td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th>巡查次数</th>\n' +
// '\t<td>15次</td>\n' +
// '\t<td><button type="button">点击查看</button></td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th>疑似丢失装备数</th>\n' +
// '\t<td>5件</td>\n' +
// '\t<td><button type="button">点击查看</button></td>\n' +
// '</tr>\n' +
// '<tr>\n' +
// '\t<th>过期产品清单</th>\n' +
// '\t<td><button type="button">点击查看</button></td>\n' +
// '</tr>\n' +
// '\t</table>',
scale: 10, // 和原始大小相比的缩放比例
minimumPixelSize: 100 // 最小尺寸,防止太小而看不见
})
return this.viewer.trackedEntity = entity ;
},