Skip to content

Commit 104675c

Browse files
Merge pull request #155 from OS2iot/feature/SmallerMapChanges
Feature/smaller map changes such as maximize map, default center and change lat/lon.
2 parents 49c6d7a + 6d086bd commit 104675c

File tree

8 files changed

+253
-164
lines changed

8 files changed

+253
-164
lines changed

package-lock.json

Lines changed: 63 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@angular/router": "^14.2.3",
2626
"@auth0/angular-jwt": "^5.0.1",
2727
"@fortawesome/angular-fontawesome": "^0.11.1",
28-
"@fortawesome/fontawesome-free": "^5.13.1",
28+
"@fortawesome/fontawesome-free": "^5.15.4",
2929
"@fortawesome/fontawesome-svg-core": "^1.2.28",
3030
"@fortawesome/free-solid-svg-icons": "^5.13.0",
3131
"@ng-bootstrap/ng-bootstrap": "^13.0.0",
@@ -39,7 +39,8 @@
3939
"file-saver": "^2.0.2",
4040
"guid-typescript": "^1.0.9",
4141
"jwt-decode": "^3.1.2",
42-
"leaflet": "^1.7.1",
42+
"leaflet": "^1.9.4",
43+
"leaflet.fullscreen": "^3.0.1",
4344
"moment": "^2.29.4",
4445
"monaco-editor": "^0.33.0",
4546
"ng": "0.0.0",
@@ -62,6 +63,8 @@
6263
"@types/jasmine": "~3.6.0",
6364
"@types/jasminewd2": "~2.0.3",
6465
"@types/jwt-decode": "^3.1.0",
66+
"@types/leaflet": "^1.9.8",
67+
"@types/leaflet.fullscreen": "^3.0.2",
6568
"@types/node": "^12.11.1",
6669
"codelyzer": "^6.0.2",
6770
"eslint": "^7.3.1",

src/app/applications/iot-devices/iot-device-detail/iot-device-detail-generic/iot-device-detail-generic.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ <h3>{{ 'IOTDEVICE.LOCATION' | translate }}</h3>
7070
</div>
7171
<div class="row">
7272
<div class="col-6">
73-
<p><strong>{{ 'IOTDEVICE.LONGITUDE' | translate }}</strong>{{longitude | number:'2.1-6'}}</p>
73+
<p><strong>{{ 'IOTDEVICE.LATITUDE' | translate }}</strong>{{latitude | number:'2.1-6'}}</p>
7474
</div>
7575
<div class="col-6">
76-
<p><strong>{{ 'IOTDEVICE.LATITUDE' | translate }}</strong>{{latitude | number:'2.1-6'}}</p>
76+
<p><strong>{{ 'IOTDEVICE.LONGITUDE' | translate }}</strong>{{longitude | number:'2.1-6'}}</p>
7777
</div>
7878
</div>
7979
</div>

src/app/applications/iot-devices/iot-device-edit/iot-device-edit.component.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@
7777
<div class="form-group mt-3 col-12 thirty-height" *ngIf="iotDevice">
7878
<app-map [coordinates]="getCoordinates()" (updateCoordinates)="updateCoordinates($event)"></app-map>
7979
</div>
80-
80+
<div class="form-group mt-3 col-6">
81+
<label class="form-label" for="latitude">{{'IOTDEVICE.LATITUDE' | translate}}</label>
82+
<input type="number" class="form-control" id="latitude" name="latitude" [placeholder]="'00'" required
83+
[(ngModel)]="iotDevice.latitude" step=".000001" min="-90" max="90" maxlength="9"
84+
(keyup)="onCoordinateKey($event)"
85+
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('latitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('latitude')}">
86+
</div>
8187
<div class="form-group mt-3 col-6">
8288
<label class="form-label" for="longitude">{{'IOTDEVICE.LONGITUDE' | translate}}</label>
8389
<input type="number" class="form-control" id="longitude" name="longitude" [placeholder]="'00'" required
@@ -86,13 +92,6 @@
8692
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('longitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('longitude')}">
8793
</div>
8894

89-
<div class="form-group mt-3 col-6">
90-
<label class="form-label" for="latitude">{{'IOTDEVICE.LATITUDE' | translate}}</label>
91-
<input type="number" class="form-control" id="latitude" name="latitude" [placeholder]="'00'" required
92-
[(ngModel)]="iotDevice.latitude" step=".000001" min="-90" max="90" maxlength="9"
93-
(keyup)="onCoordinateKey($event)"
94-
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('latitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('latitude')}">
95-
</div>
9695
<div class="form-group mt-5">
9796
<label class="form-label" for="commentOnLocation">{{'QUESTION.LOCATION-DESCRIPTION' | translate}}</label>
9897
<input type="text" id="commentOnLocation" name="commentOnLocation" maxLength="1024"

src/app/applications/iot-devices/iot-device.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export class IotDevice {
2727
createdByName: string;
2828
updatedByName: string;
2929
applicationId: number;
30-
longitude = 0;
31-
latitude = 0;
30+
longitude = 11.764445;
31+
latitude = 55.959443;
3232
deviceModelId?: number;
3333
latestReceivedMessage: LatestReceivedMessage;
3434
lorawanSettings = new LorawanSettings();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div class="map" id="{{mapId}}"></div>
1+
<div class="map" id="{{ mapId }}"></div>

0 commit comments

Comments
 (0)