File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -2311,7 +2311,20 @@ function addPosition(position) {
23112311 marker = new L . Marker ( point , {
23122312 title : vcallsign ,
23132313 zIndexOffset : Z_CAR ,
2314- } ) . addTo ( map ) . on ( 'click' , onClick ) ;
2314+ } ) ;
2315+
2316+ if ( ! ! ! window . HTMLCanvasElement ) {
2317+ carIcon = L . icon ( {
2318+ iconUrl : image_src ,
2319+ iconSize : image_src_size ,
2320+ iconAnchor : [ 27.22 ] ,
2321+ tooltipAnchor : [ 0 , - 32 ] ,
2322+ } ) ;
2323+ marker . setIcon ( new carIcon ) ;
2324+ } else {
2325+ marker_rotate_setup ( marker , image_src ) ;
2326+ }
2327+ marker . addTo ( map ) . on ( 'click' , onClick ) ;
23152328
23162329 // Scroll list stuff here.
23172330 function onClick ( e ) {
@@ -2325,18 +2338,6 @@ function addPosition(position) {
23252338 refreshSingleNew ( _vehicle_id ) ;
23262339 } ;
23272340
2328- if ( ! ! ! window . HTMLCanvasElement ) {
2329- carIcon = L . icon ( {
2330- iconUrl : image_src ,
2331- iconSize : image_src_size ,
2332- iconAnchor : [ 27.22 ] ,
2333- tooltipAnchor : [ 0 , - 32 ] ,
2334- } ) ;
2335- marker . setIcon ( new carIcon ) ;
2336- } else {
2337- marker_rotate_setup ( marker , image_src ) ;
2338- }
2339- marker . addTo ( map ) ;
23402341 polyline = [
23412342 new L . Polyline ( point , {
23422343 color : car_colors [ color_index ] ,
You can’t perform that action at this time.
0 commit comments