-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Biel Frontera
committed
Jan 28, 2016
1 parent
2755752
commit 8cbb71a
Showing
8 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Leaflet TimeDimension v0.1.11 - 2016-01-07 | ||
* Leaflet TimeDimension v0.1.12 - 2016-01-28 | ||
* | ||
* Copyright 2016 Biel Frontera (ICTS SOCIB) | ||
* [email protected] | ||
|
@@ -51,7 +51,7 @@ | |
border-right-width: 0px; | ||
} | ||
|
||
a.leaflet-control-timecontrol{ | ||
.leaflet-bar-timecontrol a.leaflet-control-timecontrol{ | ||
height: auto; | ||
width: auto; | ||
padding: 4px 15px; | ||
|
@@ -83,16 +83,12 @@ a.timecontrol-date.timecontrol-loading:before{ | |
} | ||
|
||
|
||
a.timecontrol-slider{ | ||
.leaflet-bar-timecontrol a.timecontrol-slider{ | ||
height: auto; | ||
width: 300px; | ||
padding: 4px 15px; | ||
} | ||
|
||
a.timecontrol-slider:hover{ | ||
width: 300px; | ||
} | ||
|
||
a.timecontrol-slider .ui-slider{ | ||
margin-top: 8px; | ||
margin-bottom: 7px; | ||
|
@@ -109,7 +105,7 @@ a.timecontrol-slider .ui-slider-handle{ | |
padding: 0 2px; | ||
} | ||
|
||
a.timecontrol-speed, a.timecontrol-speed:hover{ | ||
.leaflet-bar-timecontrol a.timecontrol-speed{ | ||
width: 160px; | ||
} | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Leaflet TimeDimension v0.1.11 - 2016-01-07 | ||
* Leaflet TimeDimension v0.1.12 - 2016-01-28 | ||
* | ||
* Copyright 2016 Biel Frontera (ICTS SOCIB) | ||
* [email protected] | ||
|
@@ -613,6 +613,14 @@ L.TimeDimension.Layer = (L.Layer || L.Class).extend({ | |
|
||
getBaseLayer: function() { | ||
return this._baseLayer; | ||
}, | ||
|
||
getBounds: function() { | ||
var bounds = new L.LatLngBounds(); | ||
if (this._currentLayer) { | ||
bounds.extend(this._currentLayer.getBounds ? this._currentLayer.getBounds() : this._currentLayer.getLatLng()); | ||
} | ||
return bounds; | ||
} | ||
|
||
}); | ||
|
@@ -793,12 +801,8 @@ L.TimeDimension.Layer.WMS = L.TimeDimension.Layer.extend({ | |
var wmsParams = this._baseLayer.options; | ||
wmsParams.time = new Date(nearestTime).toISOString(); | ||
|
||
var newLayer = null; | ||
if (this._baseLayer instanceof L.TileLayer) { | ||
newLayer = L.tileLayer.wms(this._baseLayer.getURL(), wmsParams); | ||
} else { | ||
newLayer = L.nonTiledLayer.wms(this._baseLayer.getURL(), wmsParams); | ||
} | ||
var newLayer = new this._baseLayer.constructor(this._baseLayer.getURL(), wmsParams); | ||
|
||
this._layers[time] = newLayer; | ||
|
||
newLayer.on('load', (function(layer, time) { | ||
|
@@ -1302,7 +1306,7 @@ L.TimeDimension.Player = (L.Layer || L.Class).extend({ | |
|
||
_tick: function() { | ||
if (this._timeDimension.getCurrentTimeIndex() >= this._timeDimension.getAvailableTimes().length - 1) { | ||
//we reached the last step | ||
// we reached the last step | ||
if (!this._loop){ | ||
this.pause(); | ||
this.stop(); | ||
|
@@ -1427,6 +1431,7 @@ L.Control.TimeDimension = L.Control.extend({ | |
}, | ||
|
||
onAdd: function(map) { | ||
this._map = map; | ||
if (!this._timeDimension && map.timeDimension){ | ||
this._timeDimension = map.timeDimension; | ||
} | ||
|
@@ -1512,7 +1517,7 @@ L.Control.TimeDimension = L.Control.extend({ | |
|
||
_initPlayer : function(){ | ||
this._player = new L.TimeDimension.Player(this.options.playerOptions, this._timeDimension); | ||
//Update TransitionTime with the one setted on the slider | ||
// Update TransitionTime with the one setted on the slider | ||
if(this._sliderSpeed){ | ||
this._sliderSpeedValueChanged(this._sliderSpeed.slider( "value")); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Leaflet TimeDimension v0.1.11 - 2016-01-07 | ||
* Leaflet TimeDimension v0.1.12 - 2016-01-28 | ||
* | ||
* Copyright 2016 Biel Frontera (ICTS SOCIB) | ||
* [email protected] | ||
|
@@ -613,6 +613,14 @@ L.TimeDimension.Layer = (L.Layer || L.Class).extend({ | |
|
||
getBaseLayer: function() { | ||
return this._baseLayer; | ||
}, | ||
|
||
getBounds: function() { | ||
var bounds = new L.LatLngBounds(); | ||
if (this._currentLayer) { | ||
bounds.extend(this._currentLayer.getBounds ? this._currentLayer.getBounds() : this._currentLayer.getLatLng()); | ||
} | ||
return bounds; | ||
} | ||
|
||
}); | ||
|
@@ -793,12 +801,8 @@ L.TimeDimension.Layer.WMS = L.TimeDimension.Layer.extend({ | |
var wmsParams = this._baseLayer.options; | ||
wmsParams.time = new Date(nearestTime).toISOString(); | ||
|
||
var newLayer = null; | ||
if (this._baseLayer instanceof L.TileLayer) { | ||
newLayer = L.tileLayer.wms(this._baseLayer.getURL(), wmsParams); | ||
} else { | ||
newLayer = L.nonTiledLayer.wms(this._baseLayer.getURL(), wmsParams); | ||
} | ||
var newLayer = new this._baseLayer.constructor(this._baseLayer.getURL(), wmsParams); | ||
|
||
this._layers[time] = newLayer; | ||
|
||
newLayer.on('load', (function(layer, time) { | ||
|
@@ -1302,7 +1306,7 @@ L.TimeDimension.Player = (L.Layer || L.Class).extend({ | |
|
||
_tick: function() { | ||
if (this._timeDimension.getCurrentTimeIndex() >= this._timeDimension.getAvailableTimes().length - 1) { | ||
//we reached the last step | ||
// we reached the last step | ||
if (!this._loop){ | ||
this.pause(); | ||
this.stop(); | ||
|
@@ -1427,6 +1431,7 @@ L.Control.TimeDimension = L.Control.extend({ | |
}, | ||
|
||
onAdd: function(map) { | ||
this._map = map; | ||
if (!this._timeDimension && map.timeDimension){ | ||
this._timeDimension = map.timeDimension; | ||
} | ||
|
@@ -1512,7 +1517,7 @@ L.Control.TimeDimension = L.Control.extend({ | |
|
||
_initPlayer : function(){ | ||
this._player = new L.TimeDimension.Player(this.options.playerOptions, this._timeDimension); | ||
//Update TransitionTime with the one setted on the slider | ||
// Update TransitionTime with the one setted on the slider | ||
if(this._sliderSpeed){ | ||
this._sliderSpeedValueChanged(this._sliderSpeed.slider( "value")); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters