File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ L.Control.SliderControl = L.Control.extend({
1212 markers : null ,
1313 range : false ,
1414 follow : false ,
15+ sameDate : false ,
1516 alwaysShowDate : false ,
1617 rezoom : null
1718 } ,
@@ -104,6 +105,7 @@ L.Control.SliderControl = L.Control.extend({
104105 values : _options . values ,
105106 min : _options . minValue ,
106107 max : _options . maxValue ,
108+ sameDate : _options . sameDate ,
107109 step : 1 ,
108110 slide : function ( e , ui ) {
109111 var map = _options . map ;
@@ -147,6 +149,16 @@ L.Control.SliderControl = L.Control.extend({
147149 fg . addLayer ( _options . markers [ i ] ) ;
148150 }
149151 }
152+ } else if ( _options . sameDate ) {
153+ var currentTime ;
154+ if ( _options . markers [ ui . value ] . feature !== undefined ) {
155+ currentTime = _options . markers [ ui . value ] . feature . properties . time ;
156+ } else {
157+ currentTime = _options . markers [ ui . value ] . options . time ;
158+ }
159+ for ( i = _options . minValue ; i <= _options . maxValue ; i ++ ) {
160+ if ( _options . markers [ i ] . options . time == currentTime ) map . addLayer ( _options . markers [ i ] ) ;
161+ }
150162 } else {
151163 for ( i = _options . minValue ; i <= ui . value ; i ++ ) {
152164 if ( _options . markers [ i ] ) {
You can’t perform that action at this time.
0 commit comments