Commit b0a05372 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Agrega dimensión temporal a getFeatureInfo

parent 03eb7b0b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -122,14 +122,21 @@ define([

		_onMapClick: function(evt) {

			this._emitEvt('CLICK', {
			this._emitEvt('CLICK', this._getMapClickEventValue(evt));
		},

		_getMapClickEventValue: function(evt) {

			var inheritedValue = this.inherited(arguments) || {};

			return this._merge([inheritedValue, {
				latLng: evt.latlng,
				zoom: this.getZoom(),
				bbox: this.getBounds(),
				size: this.map.getSize(),
				containerPoint: evt.containerPoint,
				layerPoint: evt.layerPoint
			});
			}]);
		},

		_setOwnCallbacksForEvents: function() {
+15 −5
Original line number Diff line number Diff line
@@ -114,10 +114,6 @@ define([

			this._timeDimensionInstance.setAvailableTimes(times, 'replace');

			if (this.timeDimensionCurrentTime) {
				this._timeDimensionInstance.setCurrentTime(this.timeDimensionCurrentTime);
			}

			this._setValidTimePosition(timeLimitsObj);
		},

@@ -151,7 +147,7 @@ define([

			var currStartMoment = timeLimitsObj.startMoment,
				currEndMoment = timeLimitsObj.endMoment,
				currTime = this._timeDimensionInstance.getCurrentTime(),
				currTime = this.timeDimensionCurrentTime || this._getCurrentlySelectedTime(),
				validTimePosition = currTime;

			if (currStartMoment.isAfter(currTime)) {
@@ -163,6 +159,11 @@ define([
			this._timeDimensionInstance.setCurrentTime(validTimePosition);
		},

		_getCurrentlySelectedTime: function() {

			return this._timeDimensionInstance && this._timeDimensionInstance.getCurrentTime();
		},

		_addTimeDimensionWidget: function() {

			this._timeDimensionInstance = new L.TimeDimension({
@@ -250,6 +251,15 @@ define([
				timesArray = L.TimeDimension.Util.explodeTimeRange(layerStartTime, layerEndTime, layerPeriod);

			layerInstance.setAvailableTimes(timesArray);
		},

		_getMapClickEventValue: function(evt) {

			var inheritedValue = this.inherited(arguments) || {};

			return this._merge([inheritedValue, {
				time: this._getCurrentlySelectedTime()
			}]);
		}
	});
});