Cesium primitive方式添加label

标题 Cesium primitive方式添加label

labels =viewer.scene.primitives.add(new Cesium.LabelCollection())
 self.labels.add({
       position: new Cesium.Cartesian3.fromDegrees(self.labelPosition[i].longitude, self.labelPosition[i].latitude, 200),
       text: self.label + '',
       font: '12px Helvetica',
       horizontalOrigin : Cesium.HorizontalOrigin.CENTER,
       verticalOrigin : Cesium.VerticalOrigin.CENTER,
       distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1000, 500000),
                                       // eyeOffset: Cesium.Cartesian3(100.0, 0.0, 0.0),
       heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
     })

你可能感兴趣的:(Cesium,Cesium)