Billboard - Zudokakikuto/OreCZML GitHub Wiki

This page describes the content of a CZMLSecondaryObject document. Please read CZMLSecondaryObject for the intern architecture of CZMLPrimaryObjects.

Billboard

The billboard object applies to every object that allows a 2D display of its representation (like Satellite or CZMLGroundStation).

Implements : CZMLSecondaryObject

Example :

"billboard":{
      "horizontalOrigin":"CENTER",
      "color":{
        "rgba":[
          0,255,255,195
        ]
      },
      "image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADJSURBVDhPnZHRDcMgEEMZjVEYpaNklIzSEfLfD4qNnXAJSFWfhO7w2Zc0Tf9QG2rXrEzSUeZLOGm47WoH95x3Hl3jEgilvDgsOQUTqsNl68ezEwn1vae6lceSEEYvvWNT/Rxc4CXQNGadho1NXoJ+9iaqc2xi2xbt23PJCDIB6TQjOC6Bho/sDy3fBQT8PrVhibU7yBFcEPaRxOoeTwbwByCOYf9VGp1BYI1BA+EeHhmfzKbBoJEQwn1yzUZtyspIQUha85MpkNIXB7GizqDEECsAAAAASUVORK5CYII=",
      "scale":1.5,
      "show":true
    },

Properties

cesiumResourceBehavior - CesiumResourcesBehavior : Can take two values :

  • EMBED : Allows an image from an URL to be displayed
  • LINK_TO : Allows an image from a directory/URIValue to be displayed
  • default : LINK_TO

show - boolean : Whether or not the billboard is shown. default : true.

imageStr - String : The URIValue of the image to be displayed

cesiumHorizontalOrigin - CesiumHorizontalOrigin : The horizontal origin of the billboard, which determines whether the billboard image is left-, center-, or right-aligned with the position. It can take the values :

  • LEFT
  • CENTER
  • RIGHT
  • default : CENTER

color - Color : The RGBA color of the image. default : red = 0, green = 255, blue = 255, alpha = 195.

scale - double : The scale of the billboard. The scale is multiplied with the pixel size of the billboard's image. For example, if the scale is 2.0, the billboard will be rendered with twice the number of pixels, in each direction, of the image. default : 1.5.

Build

The Billboard object can be build with :

  • A cesiumResourceBahavior, a cesiumHorizontalorigin, an Uri value of an image, the show, a scale, a color :
Billboard billboard = new Billboard(cesiumResourceBahavior, cesiumHorizontalorigin, imageStr, show, scale, color);
  • An URI value of an image :
Billboard billboard = new Billboard(imageStr);