Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record gpx feature #1247

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7f65c40
feat(gpxRecordButton): fixed so new track record feature works withou…
CASSI01 Dec 19, 2022
f861661
feat(gpxRecordButton): added history window to see previously recorde…
CASSI01 Jan 6, 2023
638447c
feat(gpxRecordButton): fixed UI problems and added download button in…
CASSI01 Jan 16, 2023
5a5443a
feat(gpxRecordButton): closed app now retains information of unfinish…
CASSI01 Feb 3, 2023
8b45cb5
feat(gpxRecordButton): fixed subscription issues while updating index…
CASSI01 Feb 3, 2023
51d4391
feat(gpxRecordButton): fixed issue where trace in indexedDB wasn't de…
CASSI01 Feb 3, 2023
3144e54
feat(gpxRecordButton): changed var names to english and fixed to use …
CASSI01 Feb 10, 2023
c4b5a9b
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Feb 14, 2023
bde4df1
feat(gpxRecordButton): added user orientation when in movement
CASSI01 Feb 17, 2023
bbdb301
Merge branch 'recordGpxFeat' of https://github.com/infra-geo-ouverte/…
CASSI01 Feb 17, 2023
ae3d9a2
feat(gpxRecordButton): fixed little issues with gpx recording and ori…
CASSI01 Feb 24, 2023
c9ec107
feat(gpxRecordButton): fixed some issues in gpx recording
CASSI01 Mar 10, 2023
b86bfe0
feat(gpxRecordButton): fixed naming of recorded gpx files
CASSI01 Mar 17, 2023
74f6fe0
feat(gpxRecordButton): fixed error message for gpx recording
CASSI01 Mar 20, 2023
6d2fa3b
feat(gpxRecordButton): fixed error when pressing gpx record button wh…
CASSI01 Mar 20, 2023
b1224f3
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Mar 22, 2023
5f90698
fix(record-gps): adjustement with next branch
pelord Mar 22, 2023
8da2cc7
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Mar 30, 2023
55b2b2d
Merge branch 'next' of https://github.com/infra-geo-ouverte/igo2-lib …
CASSI01 Mar 31, 2023
184c04a
feat(gpxRecordButton): modified interface for gpx recording and now p…
CASSI01 May 8, 2023
e462270
Merge branch 'next' of https://github.com/infra-geo-ouverte/igo2-lib …
CASSI01 May 9, 2023
8ec9f70
feat(gpxRecordButton): fixed error with file import from history
CASSI01 May 9, 2023
1e394dc
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Jun 14, 2023
cc427ea
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Sep 13, 2023
916b8fc
Merge remote-tracking branch 'origin/release/16.0.0' into recordGpxFeat
pelord Oct 10, 2023
7aaf2c4
Merge remote-tracking branch 'origin/release/16.0.0' into recordGpxFeat
pelord Oct 13, 2023
91a4afa
Merge remote-tracking branch 'origin/next' into recordGpxFeat
pelord Nov 30, 2023
87d1c03
chore(*): format files
pelord Nov 30, 2023
b867b32
Merge remote-tracking branch 'origin/release/16.1.0' into recordGpxFeat
pelord Dec 11, 2023
935bf5a
Merge tag 'v16.1.0' into recordGpxFeat
pelord Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth/src/lib/shared/auth-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Injectable } from '@angular/core';

import { BaseStorage, ConfigService, StorageScope } from '@igo2/core';

import { AuthService } from './auth.service';
import { AuthStorageOptions } from './auth-storage.interface';
import { AuthService } from './auth.service';
import { TokenService } from './token.service';

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BrowserOptions, ErrorHandlerOptions } from '@sentry/angular-ivy';

import { MonitoringOptions } from '../shared/monitoring.interface';

export type SentryMonitoringOptions = BrowserOptions &
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/lib/monitoring/sentry/sentry.utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isTracingEnabled } from './sentry.utils';
import { SentryMonitoringOptions } from './sentry.interface';
import { MOCK_SENTRY_OPTIONS } from '../__mocks__/monitoring-mock';
import { SentryMonitoringOptions } from './sentry.interface';
import { isTracingEnabled } from './sentry.utils';

const getOptions = (
options?: Partial<SentryMonitoringOptions>
Expand Down
7 changes: 5 additions & 2 deletions packages/core/src/lib/monitoring/sentry/sentry.utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { setUser } from '@sentry/angular-ivy';
import { SentryMonitoringOptions } from './sentry.interface';

import { BaseUser } from '../../user';
import { SentryMonitoringOptions } from './sentry.interface';

export const isTracingEnabled = (options: SentryMonitoringOptions): boolean =>
options.enableTracing || !!options.tracesSampleRate || !!options.tracesSampler;
options.enableTracing ||
!!options.tracesSampleRate ||
!!options.tracesSampler;

export const identifySentryUser = (user: BaseUser | null): void => {
setUser(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { SentryMonitoringOptions } from "../sentry/sentry.interface";
import { SentryMonitoringOptions } from '../sentry/sentry.interface';

export type AnyMonitoringOptions = SentryMonitoringOptions;
3 changes: 3 additions & 0 deletions packages/geo/src/lib/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ export * from './shared';

export * from './map-browser';
export * from './zoom-button';
export * from './record-button';
export * from './record-button/record-parameters';
export * from './record-button/gpx-selection';
export * from './menu-button';
export * from './geolocate-button';
export * from './home-extent-button';
Expand Down
37 changes: 37 additions & 0 deletions packages/geo/src/lib/map/map.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio';
import { MatTableModule } from '@angular/material/table';
import { MatTooltipModule } from '@angular/material/tooltip';

import { IgoConfirmDialogModule } from '@igo2/common';
Expand All @@ -16,6 +22,15 @@ import { MapBrowserComponent } from './map-browser/map-browser.component';
import { MapCenterComponent } from './map-center/map-center.component';
import { MenuButtonComponent } from './menu-button/menu-button.component';
import { OfflineButtonComponent } from './offline-button/offline-button.component';
import { GpxSelectionComponent } from './record-button/gpx-selection/gpx-selection.component';
import {
PauseStopComponent,
RecordButtonComponent
} from './record-button/record-button.component';
import {
RecordParametersComponent,
WarningDialogComponent
} from './record-button/record-parameters/record-parameters.component';
import { RotationButtonComponent } from './rotation-button/rotation-button.component';
import { HoverFeatureDirective } from './shared/hover-feature.directive';
import { PointerPositionDirective } from './shared/map-pointer-position.directive';
Expand All @@ -27,6 +42,14 @@ import { ZoomButtonComponent } from './zoom-button/zoom-button.component';
@NgModule({
imports: [
CommonModule,

MatRadioModule,
MatFormFieldModule,
MatInputModule,
FormsModule,
MatDialogModule,
MatTableModule,

IgoLanguageModule,
IgoConfirmDialogModule,
MatIconModule,
Expand All @@ -36,6 +59,13 @@ import { ZoomButtonComponent } from './zoom-button/zoom-button.component';
exports: [
MapBrowserComponent,
ZoomButtonComponent,

RecordParametersComponent,
RecordButtonComponent,
GpxSelectionComponent,
PauseStopComponent,
WarningDialogComponent,

GeolocateButtonComponent,
HomeExtentButtonComponent,
RotationButtonComponent,
Expand All @@ -54,6 +84,13 @@ import { ZoomButtonComponent } from './zoom-button/zoom-button.component';
declarations: [
MapBrowserComponent,
ZoomButtonComponent,

RecordParametersComponent,
RecordButtonComponent,
GpxSelectionComponent,
PauseStopComponent,
WarningDialogComponent,

GeolocateButtonComponent,
HomeExtentButtonComponent,
RotationButtonComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<h1 mat-dialog-title>
{{ 'igo.geo.record-prompts.filesToDownload' | translate }}
</h1>
<div mat-dialog-content>
<mat-radio-group class="radio-group element" [(ngModel)]="gpxType">
<mat-radio-button value="track">{{
'igo.geo.record-prompts.track' | translate
}}</mat-radio-button>
<mat-radio-button value="points">Points</mat-radio-button>
<mat-radio-button value="both">{{
'igo.geo.record-prompts.both' | translate
}}</mat-radio-button>
</mat-radio-group>
</div>
<div mat-dialog-actions style="padding: 0 0 8px 0">
<button
mat-raised-button
color="warn"
(click)="onNoClick()"
style="margin-top: 8px"
>
{{ 'igo.geo.record-prompts.delete' | translate }}
</button>
<button
mat-raised-button
[mat-dialog-close]="gpxType"
cdkFocusInitial
style="margin-right: 8px; margin-top: 8px"
>
{{ 'igo.geo.record-prompts.save' | translate }}
</button>
<button
mat-raised-button
[mat-dialog-close]="undefined"
cdkFocusInitial
style="margin-left: 0; margin-top: 8px"
>
{{ 'igo.geo.record-prompts.continueRecording' | translate }}
</button>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.radio-group {
display: flex;
flex-direction: column;
margin: 15px 0;
}

.element > * {
margin: 5px;
}

.element {
margin: 5px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Component } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';

import { ConfirmDialogService } from '@igo2/common';
import { LanguageService } from '@igo2/core';

@Component({
selector: 'igo-gpx-selection',
templateUrl: './gpx-selection.component.html',
styleUrls: ['./gpx-selection.component.scss']
})
export class GpxSelectionComponent {
gpxType: string = 'track';

constructor(
private dialogRef: MatDialogRef<GpxSelectionComponent>,
private languageService: LanguageService,
private confirmDialogService: ConfirmDialogService
) {}

onNoClick(): void {
this.confirmDialogService
.open(
this.languageService.translate.instant(
'igo.geo.record-prompts.confirmNotDownloadGpx'
)
)
.subscribe((res) => {
if (res === true) {
this.dialogRef.close('noDownload');
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './gpx-selection.component';
1 change: 1 addition & 0 deletions packages/geo/src/lib/map/record-button/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './record-button.component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<button
style="
position: absolute;
top: 95px;
right: 5px;
opacity: 75%;
background-color: #fafafa;
border: none;
color: black;
text-align: center;
text-decoration: none;
display: inline-block;
padding: 7px 7px 7px 5px;
border-radius: 6px;
"
(click)="record()"
>
<span></span>
<div *ngIf="!recordParameters">
<span style="font-size: 1.25em"
><mat-icon
svgIcon="disc"
[color]="isRecording ? 'warn' : ''"
style="vertical-align: middle"
></mat-icon>
</span>
<span style="vertical-align: middle">{{
recordParameters
? getTimeRecording()
: ('igo.geo.mapButtons.record' | translate)
}}</span>
</div>
<div *ngIf="recordParameters">
<span style="font-size: 1.25em"
><mat-icon
[svgIcon]="isRecording ? 'disc' : 'play'"
[color]="isRecording ? 'warn' : ''"
style="vertical-align: middle"
></mat-icon>
</span>
<span style="vertical-align: middle">{{
recordParameters
? getTimeRecording()
: ('igo.geo.mapButtons.record' | translate)
}}</span>
</div>
</button>
Empty file.
Loading