cesium 學習筆記(2)2018.6.11
阿新 • • 發佈:2018-11-09
1 在cesium上畫矩形(寫在czml裡)材質可以是個 圖片
{ "id": "leida1", "name": "leida1", "description": "<table class='cesium-infoBox-defaultTable'><tbody><tr><th>資訊1</th><td>AAA</td></tr><tr><th>資訊2</th><td>BBB</td></tr><tr><th>資訊3</th><td>CCC</td></tr></tbody></table>", "label": { "fillColor": { "rgba": [ 255, 255, 0, 255 ] }, "font": "11pt Lucida Console", "horizontalOrigin": "LEFT", "outlineColor": { "rgba": [ 0, 0, 0, 255 ] }, "outlineWidth": 3, "pixelOffset": { "cartesian2": [ -60, -60 ] }, "style": "FILL_AND_OUTLINE", "text": "1號雷達" }, "rectangle" : { "coordinates" : { "wsenDegrees" : [125.7083, 45.3304, 126.9083, 46.5304] }, "height" :1000, "fill" : true, "material" : { "image" : { "image" : { "uri" : "../image/leida1.jpg" }, "color" : { "rgba" : [255, 255, 255, 255] } } } }, "position": { "cartographicDegrees": [ 126.3083, 45.9304,10000 ] } },
2 在cesium裡通過廣告牌載入文字和圖片
{ "id": "kongjunshiyanxunlianjidi", "name": "空軍試驗訓練基地", "description": "<p></p>", "label": { "fillColor": { "rgba": [ 255, 255, 0, 255 ] }, "font": "11pt Lucida Console", "horizontalOrigin": "LEFT", "outlineColor": { "rgba": [ 0, 0, 0, 255 ] }, "outlineWidth": 3, "pixelOffset": { "cartesian2": [ 15, 0 ] }, "style": "FILL_AND_OUTLINE", "text": "空軍試驗訓練基地" }, "billboard": { "image": { "uri": "images/kj.png" }, "scale": 1 }, "position": { "cartographicDegrees": [ 103.83, 36.06, 0 ] } },