Do not overwrite FORMAT_OPTIONS if it is present already

This commit is contained in:
Bart van den Eijnden
2015-04-23 20:03:33 +02:00
parent 70b0406c50
commit f0bef58ba3
4 changed files with 51 additions and 2 deletions

View File

@@ -295,7 +295,11 @@ ol.source.ImageWMS.prototype.getRequestUrl_ =
switch (this.serverType_) {
case ol.source.wms.ServerType.GEOSERVER:
var dpi = (90 * pixelRatio + 0.5) | 0;
params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
if (goog.isDef(params['FORMAT_OPTIONS'])) {
params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
} else {
params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
}
break;
case ol.source.wms.ServerType.MAPSERVER:
params['MAP_RESOLUTION'] = 90 * pixelRatio;