Skip to content

Commit

Permalink
Release v0.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Biel Frontera committed Jan 28, 2016
1 parent 2755752 commit 8cbb71a
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 32 deletions.
12 changes: 4 additions & 8 deletions dist/leaflet.timedimension.control.css
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]
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet.timedimension.control.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/leaflet.timedimension.min.js

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions dist/leaflet.timedimension.src.js
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]
Expand Down Expand Up @@ -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;
}

});
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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"));
}
Expand Down
23 changes: 14 additions & 9 deletions dist/leaflet.timedimension.src.withlog.js
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]
Expand Down Expand Up @@ -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;
}

});
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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"));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leaflet-timedimension",
"version": "0.1.11",
"version": "0.1.12",
"description": "Add time dimension capabilities on a Leaflet map",
"keywords": [
"gis",
Expand Down
3 changes: 2 additions & 1 deletion src/leaflet.timedimension.control.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ L.Control.TimeDimension = L.Control.extend({
},

onAdd: function(map) {
this._map = map;
if (!this._timeDimension && map.timeDimension){
this._timeDimension = map.timeDimension;
}
Expand Down Expand Up @@ -111,7 +112,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"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/leaflet.timedimension.player.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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();
Expand Down

0 comments on commit 8cbb71a

Please sign in to comment.