cesium 学习笔记(2)2018.6.11

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
        ]
      }
    },

猜你喜欢

转载自blog.csdn.net/brother_rain/article/details/80648696