How to use the angular-cesium.CesiumEvent.LEFT_DOUBLE_CLICK 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 / tracks-layer / tracks-layer.component.ts View on Github external
if (this.lastPickTrack && (!track || track.id !== this.lastPickTrack.id)) {
        this.lastPickTrack.picked = false;
        this.layer.update(this.lastPickTrack, this.lastPickTrack.id);
      }
      if (track && (!this.lastPickTrack || track.id !== this.lastPickTrack.id)) {
        track.picked = true;
        this.layer.update(track, track.id);
      }
      this.lastPickTrack = track;
    });


    // Open dialog on double click
    const doubleClickObservable = this.mapEventsManager.register({
      entityType: Track,
      event: CesiumEvent.LEFT_DOUBLE_CLICK,
      pick: PickOptions.PICK_FIRST,
      priority: 2,
    });
    doubleClickObservable.subscribe((event) => {
      const track = event.entities !== null ? event.entities[0] : null;
      if (track) {
        this.ngZone.run(() => this.openDialog(track, event.cesiumEntities[0]));
      }
    });
  }