How to use the @igo2/utils.SubjectStatus.Error function in @igo2/utils

To help you get started, we’ve selected a few @igo2/utils 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 infra-geo-ouverte / igo2-lib / projects / geo / src / lib / print / shared / print.service.ts View on Github external
(status: SubjectStatus) => {
        if (status === SubjectStatus.Done) {
          if (options.showLegend === true) {
            this.addLegend(doc, map, margins);
          } else {
            this.saveDoc(doc);
          }
        }

        if (status === SubjectStatus.Done || status === SubjectStatus.Error) {
          this.activityService.unregister(this.activityId);
          status$.next(SubjectStatus.Done);
        }
      }
    );
github infra-geo-ouverte / igo2-lib / packages / geo / src / lib / print / shared / print.service.ts View on Github external
(status: SubjectStatus) => {
        if (status === SubjectStatus.Done) {
          if (options.showLegend === true) {
            this.addLegend(doc, map, margins, resolution);
          } else {
            this.saveDoc(doc);
          }
        }

        if (status === SubjectStatus.Done || status === SubjectStatus.Error) {
          this.activityService.unregister(this.activityId);
          status$.next(SubjectStatus.Done);
        }
      }
    );
github infra-geo-ouverte / igo2-lib / projects / geo / src / lib / print / shared / print.service.ts View on Github external
timeout = window.setTimeout(() => {
        mapStatus$$.unsubscribe();

        let status = SubjectStatus.Done;
        try {
          this.addCanvas(doc, canvas, size, margins);
        } catch (err) {
          status = SubjectStatus.Error;
          this.messageService.error(
            this.languageService.translate.instant('igo.geo.printForm.corsErrorMessageBody'),
            this.languageService.translate.instant('igo.geo.printForm.corsErrorMessageHeader'),
            'print'
          );
        }

        this.renderMap(map, mapSize, extent);
        status$.next(status);
      }, 200);
    });
github infra-geo-ouverte / igo2-lib / packages / geo / src / lib / print / shared / print.service.ts View on Github external
timeout = window.setTimeout(() => {
        mapStatus$$.unsubscribe();

        let status = SubjectStatus.Done;
        try {
          this.addCanvas(doc, canvas, margins);
        } catch (err) {
          status = SubjectStatus.Error;
          this.messageService.error(
            this.languageService.translate.instant(
              'igo.geo.printForm.corsErrorMessageBody'
            ),
            this.languageService.translate.instant(
              'igo.geo.printForm.corsErrorMessageHeader'
            ),
            'print'
          );
        }

        this.renderMap(map, mapSize, extent);
        status$.next(status);
      }, 200);
    });