@@ -318,13 +318,13 @@ var LeafletReactTrackPlayer = function (_MapLayer) {
318318 iconSize : [ 35 , 35 ]
319319 } ) ;
320320 } ;
321+ var course = this . props . customMarker && this . props . customCourse && this . state . track [ 0 ] && this . state . track [ 0 ] . course ? this . state . track [ 0 ] . course : null ;
321322 var finishMarker = _leaflet2 . default . marker ( this . props . track [ 0 ] , {
322- icon : this . createIcon ( this . props . track [ 0 ] . course )
323+ icon : this . createIcon ( course )
323324 } ) ;
324325 this . props . leaflet . map . addLayer ( finishMarker ) ;
325-
326326 // polyline
327- var snakePolyline = _leaflet2 . default . multiOptionsPolyline ( this . props . track , _extends ( { } , paramsForMultiPolyline ( this . props ) , {
327+ var snakePolyline = _leaflet2 . default . multiColorsPolyline ( this . props . track , _extends ( { } , paramsForMultiPolyline ( this . props ) , {
328328 timeFormat : this . props . timeFormat ,
329329 progressFormat : this . props . progressFormat ,
330330 startPosition : this . props . startPosition
@@ -352,7 +352,7 @@ var LeafletReactTrackPlayer = function (_MapLayer) {
352352
353353 if ( fromProps . track . length !== toProps . track . length && this . state . activeStream ) {
354354 this . setState ( { active : true } ) ;
355- var newPointsPolyline = this . props . progressFormat === "default" || this . props . progressFormat === "distance" ? _leaflet2 . default . multiOptionsPolyline ( toProps . track . slice ( fromProps . track . length - 1 ) , paramsForMultiPolyline ( this . props ) ) : _leaflet2 . default . multiOptionsPolyline ( toProps . track . filter ( function ( item ) {
355+ var newPointsPolyline = this . props . progressFormat === "default" || this . props . progressFormat === "distance" ? _leaflet2 . default . multiColorsPolyline ( toProps . track . slice ( fromProps . track . length - 1 ) , paramsForMultiPolyline ( this . props ) ) : _leaflet2 . default . multiColorsPolyline ( toProps . track . filter ( function ( item ) {
356356 return Number ( item . t ) > Number ( fromProps . track [ fromProps . track . length - 1 ] . t ) ;
357357 } ) , paramsForMultiPolyline ( this . props ) ) ;
358358 var keys = Object . keys ( newPointsPolyline . _layers ) ;
@@ -475,7 +475,7 @@ var LeafletReactTrackPlayer = function (_MapLayer) {
475475 className : "tp_track-line_active"
476476 } )
477477 ) ,
478- _react2 . default . createElement (
478+ this . props . showDots ? _react2 . default . createElement (
479479 "div" ,
480480 {
481481 className : "tp_track-points" ,
@@ -491,7 +491,7 @@ var LeafletReactTrackPlayer = function (_MapLayer) {
491491 maxDistance : this . state . maxDistance ,
492492 durationTrack : this . state . durationTrack
493493 } )
494- )
494+ ) : null
495495 )
496496 ) : null
497497 ) ;
@@ -502,7 +502,6 @@ var LeafletReactTrackPlayer = function (_MapLayer) {
502502} ( _reactLeaflet . MapLayer ) ;
503503
504504LeafletReactTrackPlayer . defaultProps = {
505- track : [ ] ,
506505 useControl : true ,
507506 useInformationPanel : false ,
508507 optionMultyIdxFn : function optionMultyIdxFn ( ) { } ,
@@ -516,6 +515,7 @@ LeafletReactTrackPlayer.defaultProps = {
516515 progressFormat : "default" ,
517516 startPosition : 0 ,
518517 streamData : false ,
518+ showDots : false ,
519519 callbackFinish : function callbackFinish ( ) { } ,
520520 callbackPrev : function callbackPrev ( ) { } ,
521521 callbackNext : function callbackNext ( ) { } ,
@@ -541,6 +541,7 @@ LeafletReactTrackPlayer.propTypes = {
541541 callbackFinish : _propTypes2 . default . func ,
542542 startPosition : _propTypes2 . default . oneOfType ( [ _propTypes2 . default . string , _propTypes2 . default . number ] ) ,
543543 streamData : _propTypes2 . default . bool ,
544+ showDots : _propTypes2 . default . bool ,
544545 callbackNext : _propTypes2 . default . func ,
545546 callbackPrev : _propTypes2 . default . func ,
546547 callbackSpeed : _propTypes2 . default . func ,
0 commit comments