@@ -25,11 +25,11 @@ export class MapComponent implements OnInit {
25
25
map ! : Map ;
26
26
vectorSource ! : VectorSource ;
27
27
28
- iconSize = 0.15 ;
28
+ // iconSize = 0.15;
29
29
center = [ 8.970869314606485 , 47.73981783654207 ] ;
30
30
userLocationFeature : Feature = new Feature ( ) ;
31
31
32
- @ViewChild ( 'tooltip_map' , { static : true } ) tooltip ! : ElementRef ;
32
+ @ViewChild ( 'tooltip_map' , { static : true } ) tooltip ! : ElementRef ;
33
33
34
34
constructor ( private router : Router , private airtableService : AirtableService , private geolocationService : GeolocationService ) { }
35
35
@@ -74,7 +74,7 @@ export class MapComponent implements OnInit {
74
74
scale : 0.05 // Größe des Pins
75
75
} )
76
76
} ) ) ;
77
-
77
+
78
78
this . vectorSource . addFeature ( this . userLocationFeature ) ;
79
79
this . map . on ( 'click' , this . handleMapClick . bind ( this ) ) ;
80
80
this . map . on ( 'pointermove' , this . handlePointerMove . bind ( this ) ) ;
@@ -91,7 +91,7 @@ export class MapComponent implements OnInit {
91
91
image : new Icon ( {
92
92
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
93
93
color : this . getColor ( activity ) ,
94
- size : [ this . iconSize , this . iconSize ]
94
+ size : [ activity . type . svg_scale , activity . type . svg_scale ]
95
95
} )
96
96
} )
97
97
} ) ;
@@ -104,7 +104,7 @@ export class MapComponent implements OnInit {
104
104
image : new Icon ( {
105
105
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
106
106
color : this . getColor ( activity ) ,
107
- scale : this . iconSize
107
+ scale : activity . type . svg_scale
108
108
} )
109
109
} ) ) ;
110
110
} ) ;
@@ -141,7 +141,7 @@ export class MapComponent implements OnInit {
141
141
image : new Icon ( {
142
142
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
143
143
color : this . getColor ( activity ) ,
144
- scale : this . iconSize ,
144
+ scale : activity . type . svg_scale
145
145
} )
146
146
} ) ) ;
147
147
}
@@ -157,7 +157,7 @@ export class MapComponent implements OnInit {
157
157
image : new Icon ( {
158
158
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
159
159
color : this . getColor ( activity ) ,
160
- scale : this . iconSize
160
+ scale : activity . type . svg_scale
161
161
} )
162
162
} ) ) ;
163
163
} ) ;
@@ -175,10 +175,10 @@ export class MapComponent implements OnInit {
175
175
console . log ( 'Center: ' , this . center ) ;
176
176
this . map . getView ( ) . setCenter ( fromLonLat ( this . center ) ) ;
177
177
const coordinates = fromLonLat ( this . center ) ;
178
- this . userLocationFeature . setGeometry ( new Point ( coordinates ) ) ;
178
+ this . userLocationFeature . setGeometry ( new Point ( coordinates ) ) ;
179
179
} )
180
180
. catch ( error => {
181
181
console . error ( 'Error getting location: ' , error ) ;
182
182
} ) ;
183
- }
183
+ }
184
184
}
0 commit comments