Open rmarzocchi84 opened 3 years ago
Hi @rmarzocchi84, you could create a new TimeDimension.Layer class and change how the url for a given time is built.
This should work:
L.TimeDimension.Layer.WMS.Rasdaman = L.TimeDimension.Layer.WMS.extend({
_createLayerForTime:function(time){
var wmsParams = this._baseLayer.options;
var date = new Date(time);
wmsParams.time = '"' + date.toISOString() + '"';
return new this._baseLayer.constructor(this._baseLayer.getURL(), wmsParams);
}
});
L.timeDimension.layer.wms.rasdaman = function(layer, options) {
return new L.TimeDimension.Layer.WMS.Rasdaman(layer, options);
};
I have a Rasdaman WMS GetMap request (e.g. http://rasdaman.org/browser/systemtest/testcases_services/test_wms/queries/31-get_map_on_4d_coverage_dim_pressure_and_time_irregular_specified.test)
The time parameter need to be written with the " character
This is the request using this leaflet plugin that doesn't work
This is the correct request:
It is possible to change the request adding the " character