How to use the angular-cesium.AcEntity.create function in angular-cesium

To help you get started, we’ve selected a few angular-cesium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github articodeltd / angular-cesium / projects / demo / src / app / components / track-entity-layer / track-entity-layer.component.ts View on Github external
AcLayerComponent,
  AcNotification,
  ActionType,
  CameraService,
  CesiumEvent,
  MapEventsManagerService,
  PickOptions,
  SceneMode
} from 'angular-cesium';
import { BehaviorSubject } from 'rxjs';
import { MatSnackBar } from '@angular/material/snack-bar';

const initialLocation = {
  id: '1',
  actionType: ActionType.ADD_UPDATE,
  entity: AcEntity.create({
    width: 10,
    color: Cesium.Color.BLUE,
    position: Cesium.Cartesian3.fromDegrees(32, 40),
  }),
};

@Component({
  selector: 'track-entity-layer',
  templateUrl: 'track-entity-layer.component.html',
  styleUrls: [],
})
export class TrackEntityLayerComponent implements OnInit, AfterViewInit {
  @ViewChild(AcLayerComponent, {static: false}) layer: AcLayerComponent;


  points$: BehaviorSubject = new BehaviorSubject(initialLocation);
github articodeltd / angular-cesium / projects / demo / src / app / components / map-events-example / map-events-example.component.ts View on Github external
private geoConverter: CoordinateConverter,
  ) {
    const track1: AcNotification = {
      id: '0',
      actionType: ActionType.ADD_UPDATE,
      entity: AcEntity.create({
        id: '0',
        name: 'click me',
        color: Cesium.Color.BLUE,
        position: Cesium.Cartesian3.fromDegrees(-95, 40),
      }),
    };
    const track2: AcNotification = {
      id: '1',
      actionType: ActionType.ADD_UPDATE,
      entity: AcEntity.create({
        id: '1',
        name: 'choose me',
        color: Cesium.Color.AQUA,
        position: Cesium.Cartesian3.fromDegrees(-85, 35),
      }),
    };
    const track10: AcNotification = {
      id: '10',
      actionType: ActionType.ADD_UPDATE,
      entity: AcEntity.create({
        id: '10',
        name: 'click me now please!',
        color: Cesium.Color.BLUE,
        position: Cesium.Cartesian3.fromDegrees(-84, 35),
      }),
    };
github articodeltd / angular-cesium / projects / demo / src / app / utils / services / dataCovertor / convertToCesiumObject.ts View on Github external
width: 2,
    positions: Cesium.Cartesian3.fromDegreesArray(
      [
        Math.floor(Math.random() * 50), Math.floor(Math.random() * 50),
        Math.floor(Math.random() * 50), Math.floor(Math.random() * 50)
      ]),
    material: entity.id === 1 ? yellowMaterial : redMaterial
  };

  entity.point = {
    pixelSize: 15,
    color: new Cesium.Color(1.0, 1.0, 0.0, 1.0),
    position: new Cesium.Cartesian3.fromDegrees(Math.floor(Math.random() * 50), Math.floor(Math.random() * 50))
  };

  return AcEntity.create(entity);
}