diff --git a/frontend/app/gallery/gallery.component.css b/frontend/app/gallery/gallery.component.css
index 701cea6b..dc9c0cd9 100644
--- a/frontend/app/gallery/gallery.component.css
+++ b/frontend/app/gallery/gallery.component.css
@@ -1,3 +1,7 @@
-.sebm-google-map-container {
- height: 300px;
+gallery-map {
+ margin-right: 0;
+ margin-left: auto;
+ display: block;
+ height: 80px;
+ width: 100px;
}
\ No newline at end of file
diff --git a/frontend/app/gallery/gallery.component.html b/frontend/app/gallery/gallery.component.html
index 74fb7fa6..bb78babe 100644
--- a/frontend/app/gallery/gallery.component.html
+++ b/frontend/app/gallery/gallery.component.html
@@ -7,9 +7,10 @@
-
+
+
diff --git a/frontend/app/gallery/map/map.gallery.component.css b/frontend/app/gallery/map/map.gallery.component.css
index f22105e5..3e97a28b 100644
--- a/frontend/app/gallery/map/map.gallery.component.css
+++ b/frontend/app/gallery/map/map.gallery.component.css
@@ -1,4 +1,4 @@
.sebm-google-map-container {
- height: 150px;
- width: 200px;
+ width: 100%;
+ height: 100%;
}
\ No newline at end of file
diff --git a/frontend/app/gallery/map/map.gallery.component.html b/frontend/app/gallery/map/map.gallery.component.html
index b5215aca..504ceed2 100644
--- a/frontend/app/gallery/map/map.gallery.component.html
+++ b/frontend/app/gallery/map/map.gallery.component.html
@@ -1,4 +1,10 @@
-
+
;
- mapPhotos: Array<{latitude, longitude, iconUrl}> = [];
-
+ mapPhotos: Array<{latitude: string, longitude: string, iconUrl}> = [];
+ mapCenter = {latitude: "0", longitude: "0"};
//TODO: fix zooming
ngOnChanges() {
- this.mapPhotos = this.photos.filter(p => p.metadata.positionData.GPSData).map(p => {
+ this.mapPhotos = this.photos.filter(p => {
+ return p.metadata && p.metadata.positionData && p.metadata.positionData.GPSData;
+ }).map(p => {
return {
latitude: p.metadata.positionData.GPSData.latitude,
longitude: p.metadata.positionData.GPSData.longitude,
@@ -23,6 +25,10 @@ export class GalleryMapComponent implements OnChanges {
};
});
+ if (this.mapPhotos.length > 0) {
+ this.mapCenter = this.mapPhotos[0];
+ }
+
}
}