Skip to content

Commit

Permalink
Merge pull request #155 from OS2iot/feature/SmallerMapChanges
Browse files Browse the repository at this point in the history
Feature/smaller map changes such as maximize map, default center and change lat/lon.
  • Loading branch information
augusthjerrild committed Apr 17, 2024
2 parents 49c6d7a + 6d086bd commit 104675c
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 164 deletions.
65 changes: 63 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@angular/router": "^14.2.3",
"@auth0/angular-jwt": "^5.0.1",
"@fortawesome/angular-fontawesome": "^0.11.1",
"@fortawesome/fontawesome-free": "^5.13.1",
"@fortawesome/fontawesome-free": "^5.15.4",
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@ng-bootstrap/ng-bootstrap": "^13.0.0",
Expand All @@ -39,7 +39,8 @@
"file-saver": "^2.0.2",
"guid-typescript": "^1.0.9",
"jwt-decode": "^3.1.2",
"leaflet": "^1.7.1",
"leaflet": "^1.9.4",
"leaflet.fullscreen": "^3.0.1",
"moment": "^2.29.4",
"monaco-editor": "^0.33.0",
"ng": "0.0.0",
Expand All @@ -62,6 +63,8 @@
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/jwt-decode": "^3.1.0",
"@types/leaflet": "^1.9.8",
"@types/leaflet.fullscreen": "^3.0.2",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.2",
"eslint": "^7.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ <h3>{{ 'IOTDEVICE.LOCATION' | translate }}</h3>
</div>
<div class="row">
<div class="col-6">
<p><strong>{{ 'IOTDEVICE.LONGITUDE' | translate }}</strong>{{longitude | number:'2.1-6'}}</p>
<p><strong>{{ 'IOTDEVICE.LATITUDE' | translate }}</strong>{{latitude | number:'2.1-6'}}</p>
</div>
<div class="col-6">
<p><strong>{{ 'IOTDEVICE.LATITUDE' | translate }}</strong>{{latitude | number:'2.1-6'}}</p>
<p><strong>{{ 'IOTDEVICE.LONGITUDE' | translate }}</strong>{{longitude | number:'2.1-6'}}</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@
<div class="form-group mt-3 col-12 thirty-height" *ngIf="iotDevice">
<app-map [coordinates]="getCoordinates()" (updateCoordinates)="updateCoordinates($event)"></app-map>
</div>

<div class="form-group mt-3 col-6">
<label class="form-label" for="latitude">{{'IOTDEVICE.LATITUDE' | translate}}</label>
<input type="number" class="form-control" id="latitude" name="latitude" [placeholder]="'00'" required
[(ngModel)]="iotDevice.latitude" step=".000001" min="-90" max="90" maxlength="9"
(keyup)="onCoordinateKey($event)"
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('latitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('latitude')}">
</div>
<div class="form-group mt-3 col-6">
<label class="form-label" for="longitude">{{'IOTDEVICE.LONGITUDE' | translate}}</label>
<input type="number" class="form-control" id="longitude" name="longitude" [placeholder]="'00'" required
Expand All @@ -86,13 +92,6 @@
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('longitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('longitude')}">
</div>

<div class="form-group mt-3 col-6">
<label class="form-label" for="latitude">{{'IOTDEVICE.LATITUDE' | translate}}</label>
<input type="number" class="form-control" id="latitude" name="latitude" [placeholder]="'00'" required
[(ngModel)]="iotDevice.latitude" step=".000001" min="-90" max="90" maxlength="9"
(keyup)="onCoordinateKey($event)"
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('latitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('latitude')}">
</div>
<div class="form-group mt-5">
<label class="form-label" for="commentOnLocation">{{'QUESTION.LOCATION-DESCRIPTION' | translate}}</label>
<input type="text" id="commentOnLocation" name="commentOnLocation" maxLength="1024"
Expand Down
4 changes: 2 additions & 2 deletions src/app/applications/iot-devices/iot-device.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class IotDevice {
createdByName: string;
updatedByName: string;
applicationId: number;
longitude = 0;
latitude = 0;
longitude = 11.764445;
latitude = 55.959443;
deviceModelId?: number;
latestReceivedMessage: LatestReceivedMessage;
lorawanSettings = new LorawanSettings();
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/components/map/map.component.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="map" id="{{mapId}}"></div>
<div class="map" id="{{ mapId }}"></div>

0 comments on commit 104675c

Please sign in to comment.