diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md
index 482c812a93..126b0ecaa2 100644
--- a/changelog/upgrade-notes.md
+++ b/changelog/upgrade-notes.md
@@ -22,6 +22,7 @@ A number of internal types have been renamed. This will not affect those who us
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
* rename `ol.source.VectorEvent` to `ol.source.Vector.Event`
* rename `ol.source.VectorEventType` to `ol.source.Vector.EventType`
+ * rename `ol.source.wms.ServerType` to `ol.source.WMSServerType`
* rename `ol.source.WMTSRequestEncoding` to `ol.source.WMTS.RequestEncoding`
* rename `ol.style.IconAnchorUnits` to `ol.style.Icon.AnchorUnits`
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
diff --git a/examples/wms-image-custom-proj.js b/examples/wms-image-custom-proj.js
index 78464b3dbe..5fbbadc8b1 100644
--- a/examples/wms-image-custom-proj.js
+++ b/examples/wms-image-custom-proj.js
@@ -41,7 +41,7 @@ var layers = [
'LAYERS': 'ch.swisstopo.pixelkarte-farbe-pk1000.noscale',
'FORMAT': 'image/jpeg'
},
- serverType: /** @type {ol.source.wms.ServerType} */ ('mapserver')
+ serverType: /** @type {ol.source.WMSServerType} */ ('mapserver')
})
}),
new ol.layer.Image({
@@ -52,7 +52,7 @@ var layers = [
attributions: '© National parks / geo.admin.ch',
params: {'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'},
- serverType: /** @type {ol.source.wms.ServerType} */ ('mapserver')
+ serverType: /** @type {ol.source.WMSServerType} */ ('mapserver')
})
})
];
diff --git a/externs/olx.js b/externs/olx.js
index 23c3456564..810c5d2f29 100644
--- a/externs/olx.js
+++ b/externs/olx.js
@@ -5175,7 +5175,7 @@ olx.source.RasterOptions.prototype.operationType;
* @typedef {{attributions: (ol.AttributionLike|undefined),
* crossOrigin: (null|string|undefined),
* hidpi: (boolean|undefined),
- * serverType: (ol.source.wms.ServerType|string|undefined),
+ * serverType: (ol.source.WMSServerType|string|undefined),
* logo: (string|olx.LogoOptions|undefined),
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
* params: Object.,
@@ -5219,7 +5219,7 @@ olx.source.ImageWMSOptions.prototype.hidpi;
/**
* The type of the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only
* needed if `hidpi` is `true`. Default is `undefined`.
- * @type {ol.source.wms.ServerType|string|undefined}
+ * @type {ol.source.WMSServerType|string|undefined}
* @api
*/
olx.source.ImageWMSOptions.prototype.serverType;
@@ -5686,7 +5686,7 @@ olx.source.TileJSONOptions.prototype.wrapX;
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* projection: ol.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined),
- * serverType: (ol.source.wms.ServerType|string|undefined),
+ * serverType: (ol.source.WMSServerType|string|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.|undefined),
@@ -5797,7 +5797,7 @@ olx.source.TileWMSOptions.prototype.reprojectionErrorThreshold;
/**
* The type of the remote WMS server. Currently only used when `hidpi` is
* `true`. Default is `undefined`.
- * @type {ol.source.wms.ServerType|string|undefined}
+ * @type {ol.source.WMSServerType|string|undefined}
* @api
*/
olx.source.TileWMSOptions.prototype.serverType;
diff --git a/src/ol/source/imagewms.js b/src/ol/source/imagewms.js
index e3f1961d21..fedf3671d7 100644
--- a/src/ol/source/imagewms.js
+++ b/src/ol/source/imagewms.js
@@ -11,7 +11,7 @@ goog.require('ol.extent');
goog.require('ol.obj');
goog.require('ol.proj');
goog.require('ol.source.Image');
-goog.require('ol.source.wms.ServerType');
+goog.require('ol.source.WMSServerType');
goog.require('ol.string');
goog.require('ol.uri');
@@ -72,10 +72,10 @@ ol.source.ImageWMS = function(opt_options) {
/**
* @private
- * @type {ol.source.wms.ServerType|undefined}
+ * @type {ol.source.WMSServerType|undefined}
*/
this.serverType_ =
- /** @type {ol.source.wms.ServerType|undefined} */ (options.serverType);
+ /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
/**
* @private
@@ -278,7 +278,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio,
if (pixelRatio != 1) {
switch (this.serverType_) {
- case ol.source.wms.ServerType.GEOSERVER:
+ case ol.source.WMSServerType.GEOSERVER:
var dpi = (90 * pixelRatio + 0.5) | 0;
if ('FORMAT_OPTIONS' in params) {
params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
@@ -286,11 +286,11 @@ ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio,
params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
}
break;
- case ol.source.wms.ServerType.MAPSERVER:
+ case ol.source.WMSServerType.MAPSERVER:
params['MAP_RESOLUTION'] = 90 * pixelRatio;
break;
- case ol.source.wms.ServerType.CARMENTA_SERVER:
- case ol.source.wms.ServerType.QGIS:
+ case ol.source.WMSServerType.CARMENTA_SERVER:
+ case ol.source.WMSServerType.QGIS:
params['DPI'] = 90 * pixelRatio;
break;
default:
diff --git a/src/ol/source/tilewms.js b/src/ol/source/tilewms.js
index cc7751f998..aba1e7ccf4 100644
--- a/src/ol/source/tilewms.js
+++ b/src/ol/source/tilewms.js
@@ -12,7 +12,7 @@ goog.require('ol.math');
goog.require('ol.proj');
goog.require('ol.size');
goog.require('ol.source.TileImage');
-goog.require('ol.source.wms.ServerType');
+goog.require('ol.source.WMSServerType');
goog.require('ol.tilecoord');
goog.require('ol.string');
goog.require('ol.uri');
@@ -69,10 +69,10 @@ ol.source.TileWMS = function(opt_options) {
/**
* @private
- * @type {ol.source.wms.ServerType|undefined}
+ * @type {ol.source.WMSServerType|undefined}
*/
this.serverType_ =
- /** @type {ol.source.wms.ServerType|undefined} */ (options.serverType);
+ /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
/**
* @private
@@ -222,7 +222,7 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE
if (pixelRatio != 1) {
switch (this.serverType_) {
- case ol.source.wms.ServerType.GEOSERVER:
+ case ol.source.WMSServerType.GEOSERVER:
var dpi = (90 * pixelRatio + 0.5) | 0;
if ('FORMAT_OPTIONS' in params) {
params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
@@ -230,11 +230,11 @@ ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileE
params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
}
break;
- case ol.source.wms.ServerType.MAPSERVER:
+ case ol.source.WMSServerType.MAPSERVER:
params['MAP_RESOLUTION'] = 90 * pixelRatio;
break;
- case ol.source.wms.ServerType.CARMENTA_SERVER:
- case ol.source.wms.ServerType.QGIS:
+ case ol.source.WMSServerType.CARMENTA_SERVER:
+ case ol.source.WMSServerType.QGIS:
params['DPI'] = 90 * pixelRatio;
break;
default:
diff --git a/src/ol/source/wms.jsdoc b/src/ol/source/wms.jsdoc
deleted file mode 100644
index ad8776496a..0000000000
--- a/src/ol/source/wms.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.source.wms
- */
diff --git a/src/ol/source/wms.js b/src/ol/source/wmsservertype.js
similarity index 77%
rename from src/ol/source/wms.js
rename to src/ol/source/wmsservertype.js
index 628073f171..deb734ce0c 100644
--- a/src/ol/source/wms.js
+++ b/src/ol/source/wmsservertype.js
@@ -1,5 +1,4 @@
-goog.provide('ol.source.wms');
-goog.provide('ol.source.wms.ServerType');
+goog.provide('ol.source.WMSServerType');
/**
@@ -8,7 +7,7 @@ goog.provide('ol.source.wms.ServerType');
* specification that OpenLayers can make use of.
* @enum {string}
*/
-ol.source.wms.ServerType = {
+ol.source.WMSServerType = {
CARMENTA_SERVER: 'carmentaserver',
GEOSERVER: 'geoserver',
MAPSERVER: 'mapserver',