Merge pull request #2544 from elemoine/mapguide

Params not correctly handled in MapGuide source
This commit is contained in:
Éric Lemoine
2014-08-18 13:21:34 +02:00

View File

@@ -39,11 +39,16 @@ ol.source.MapGuide = function(options) {
this.displayDpi_ = goog.isDef(options.displayDpi) ? this.displayDpi_ = goog.isDef(options.displayDpi) ?
options.displayDpi : 96; options.displayDpi : 96;
/**
* @private
* @type {Object}
*/
this.params_ = goog.isDef(options.params) ? options.params : {};
var imageUrlFunction; var imageUrlFunction;
if (goog.isDef(options.url)) { if (goog.isDef(options.url)) {
var params = goog.isDef(options.params) ? options.params : {};
imageUrlFunction = ol.ImageUrlFunction.createFromParamsFunction( imageUrlFunction = ol.ImageUrlFunction.createFromParamsFunction(
options.url, params, goog.bind(this.getUrl, this)); options.url, this.params_, goog.bind(this.getUrl, this));
} else { } else {
imageUrlFunction = ol.ImageUrlFunction.nullImageUrlFunction; imageUrlFunction = ol.ImageUrlFunction.nullImageUrlFunction;
} }
@@ -54,12 +59,6 @@ ol.source.MapGuide = function(options) {
*/ */
this.imageUrlFunction_ = imageUrlFunction; this.imageUrlFunction_ = imageUrlFunction;
/**
* @private
* @type {Object}
*/
this.params_ = null;
/** /**
* @private * @private
* @type {boolean} * @type {boolean}