File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
src/laeflet-react-track-player Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " leaflet-react-track-player" ,
3
3
"description" : " This is plugin to react-leaflet. It create player for control of track." ,
4
- "version" : " 1.1.1 " ,
4
+ "version" : " 1.1.2 " ,
5
5
"private" : false ,
6
6
"main" : " lib/index.js" ,
7
7
"homepage" : " https://github.com/argonavt11/leaflet-react-track-player" ,
Original file line number Diff line number Diff line change @@ -72,13 +72,10 @@ class LeafletReactTrackPlayer extends MapLayer {
72
72
iconSize : [ 35 , 35 ]
73
73
} ) ;
74
74
const course = this . props . customMarker && this . props . customCourse && this . state . track [ 0 ] && this . state . track [ 0 ] . course ? this . state . track [ 0 ] . course : null ;
75
- if ( this . state . track [ 0 ] ) {
76
- const finishMarker = L . marker ( this . props . track [ 0 ] , {
77
- icon : this . createIcon ( course )
78
- } ) ;
79
- this . props . leaflet . map . addLayer ( finishMarker ) ;
80
- }
81
-
75
+ const finishMarker = L . marker ( this . props . track [ 0 ] , {
76
+ icon : this . createIcon ( course )
77
+ } ) ;
78
+ this . props . leaflet . map . addLayer ( finishMarker ) ;
82
79
// polyline
83
80
const snakePolyline = L . multiOptionsPolyline ( this . props . track , {
84
81
...paramsForMultiPolyline ( this . props ) ,
@@ -504,7 +501,6 @@ class LeafletReactTrackPlayer extends MapLayer {
504
501
}
505
502
506
503
LeafletReactTrackPlayer . defaultProps = {
507
- track : [ ] ,
508
504
useControl : true ,
509
505
useInformationPanel : false ,
510
506
optionMultyIdxFn : function ( ) { } ,
You can’t perform that action at this time.
0 commit comments