add entity with image on top of base shape

Skip to first unread message

Nov 10, 2019, 4:28:09 AM11/10/19
to cesium-dev

1. explanation:

I try to create entities on the map with base shape (like hexagon, circle,...) and image on top of the shape.
I am currently used PinBuilder for entity creation, but i want to display it with different pin shape style.
Each entity should have different base shape with different image.
Is there a way to add the entity this way?

2. code:

// cesium-map.directive.ts file
// current code - with PinBuilder
// its responsible to add new entity by its params
const entity = this.viewer.entities.add({
  description: type,
  position: Cesium.Cartesian3.fromDegrees(long, lat, 0),
  label: {
    text: name,
    font: '12px sans-serif',
    verticalOrigin: Cesium.VerticalOrigin.TOP,
    distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 80000)
  // maybe there something else then billboard / PinBuilder that can used here?
  billboard: {
    image: new Cesium.PinBuilder().fromUrl(
      isSelected ? selectedColor : options.color,
    verticalOrigin: Cesium.VerticalOrigin.BOTTOM

3. Context:

The app should display entities from different types (base shapes), each entity have its specific image.

4. system:

os: windows 10
browser: chrome 78
cesium: 1.55.0
angular: 5

Thanks, Yuval.
Reply all
Reply to author
0 new messages