@@ -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
@@ -86,7 +86,7 @@ export class MapComponent implements OnInit {
86
86
image : new Icon ( {
87
87
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
88
88
color : this . getColor ( activity ) ,
89
- size : [ this . iconSize , this . iconSize ]
89
+ size : [ activity . type . svg_scale , activity . type . svg_scale ]
90
90
} )
91
91
} )
92
92
} ) ;
@@ -99,7 +99,7 @@ export class MapComponent implements OnInit {
99
99
image : new Icon ( {
100
100
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
101
101
color : this . getColor ( activity ) ,
102
- scale : this . iconSize
102
+ scale : activity . type . svg_scale
103
103
} )
104
104
} ) ) ;
105
105
} ) ;
@@ -153,7 +153,7 @@ export class MapComponent implements OnInit {
153
153
image : new Icon ( {
154
154
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
155
155
color : this . getColor ( activity ) ,
156
- scale : this . iconSize ,
156
+ scale : activity . type . svg_scale
157
157
} )
158
158
} ) ) ;
159
159
}
@@ -169,7 +169,7 @@ export class MapComponent implements OnInit {
169
169
image : new Icon ( {
170
170
src : 'data:image/svg+xml;utf8,' + activity . type . svg ,
171
171
color : this . getColor ( activity ) ,
172
- scale : this . iconSize
172
+ scale : activity . type . svg_scale
173
173
} )
174
174
} ) ) ;
175
175
} ) ;
@@ -187,10 +187,10 @@ export class MapComponent implements OnInit {
187
187
console . log ( 'Center: ' , this . center ) ;
188
188
this . map . getView ( ) . setCenter ( fromLonLat ( this . center ) ) ;
189
189
const coordinates = fromLonLat ( this . center ) ;
190
- this . userLocationFeature . setGeometry ( new Point ( coordinates ) ) ;
190
+ this . userLocationFeature . setGeometry ( new Point ( coordinates ) ) ;
191
191
} )
192
192
. catch ( error => {
193
193
console . error ( 'Error getting location: ' , error ) ;
194
194
} ) ;
195
- }
195
+ }
196
196
}
0 commit comments