Skip to content

Commit 004b8ff

Browse files
committed
Merge branch 'main' into feature/current-location
2 parents 3456bf9 + 597bdd6 commit 004b8ff

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/app/components/detail/detail.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ <h1 class="card-title text-2xl font-bold text-gray-800">
4545
}
4646
</div>
4747
@if (activity.description) {
48-
<hr class="mt-3 mb-3">
4948
<div class="card-text text-gray-700 mt-2">
5049
{{ activity.description }}
5150
</div>

src/app/components/map/map.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export class MapComponent implements OnInit {
2525
map!: Map;
2626
vectorSource!: VectorSource;
2727

28-
iconSize = 0.15;
28+
//iconSize = 0.15;
2929
center = [8.970869314606485, 47.73981783654207];
3030
userLocationFeature: Feature = new Feature();
3131

32-
@ViewChild('tooltip_map', {static: true}) tooltip!: ElementRef;
32+
@ViewChild('tooltip_map', {static: true}) tooltip!: ElementRef;
3333

3434
constructor(private router: Router, private airtableService: AirtableService, private geolocationService: GeolocationService) {}
3535

@@ -86,7 +86,7 @@ export class MapComponent implements OnInit {
8686
image: new Icon({
8787
src: 'data:image/svg+xml;utf8,' + activity.type.svg,
8888
color: this.getColor(activity),
89-
size: [this.iconSize, this.iconSize]
89+
size: [activity.type.svg_scale, activity.type.svg_scale]
9090
})
9191
})
9292
});
@@ -99,7 +99,7 @@ export class MapComponent implements OnInit {
9999
image: new Icon({
100100
src: 'data:image/svg+xml;utf8,' + activity.type.svg,
101101
color: this.getColor(activity),
102-
scale: this.iconSize
102+
scale: activity.type.svg_scale
103103
})
104104
}));
105105
});
@@ -153,7 +153,7 @@ export class MapComponent implements OnInit {
153153
image: new Icon({
154154
src: 'data:image/svg+xml;utf8,' + activity.type.svg,
155155
color: this.getColor(activity),
156-
scale: this.iconSize,
156+
scale: activity.type.svg_scale
157157
})
158158
}));
159159
}
@@ -169,7 +169,7 @@ export class MapComponent implements OnInit {
169169
image: new Icon({
170170
src: 'data:image/svg+xml;utf8,' + activity.type.svg,
171171
color: this.getColor(activity),
172-
scale: this.iconSize
172+
scale: activity.type.svg_scale
173173
})
174174
}));
175175
});
@@ -187,10 +187,10 @@ export class MapComponent implements OnInit {
187187
console.log('Center: ', this.center);
188188
this.map.getView().setCenter(fromLonLat(this.center));
189189
const coordinates = fromLonLat(this.center);
190-
this.userLocationFeature.setGeometry(new Point(coordinates));
190+
this.userLocationFeature.setGeometry(new Point(coordinates));
191191
})
192192
.catch(error => {
193193
console.error('Error getting location: ', error);
194194
});
195-
}
195+
}
196196
}

src/app/services/airtable.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export class AirtableService {
4242
id: record["id"] as string,
4343
name: record.fields["name"] as string,
4444
color: record.fields["color"] as string,
45-
svg: record.fields["svg"] as string
45+
svg: record.fields["svg"] as string,
46+
svg_scale: record.fields["svg_scale"] as number
4647
};
4748
});
4849
}),);

src/app/types/types.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ export interface TypesInterface {
22
id?: string,
33
name: string,
44
color: string,
5-
svg: string
6-
5+
svg: string,
6+
svg_scale: number
77
}

0 commit comments

Comments
 (0)