Do not overwrite FORMAT_OPTIONS if it is present already
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user