Allow ol.source.{Image,Tile}WMS serverType option to be a string

This commit is contained in:
Tom Payne
2014-02-06 19:48:45 +01:00
parent 3408b8b835
commit d4ebfac74a
3 changed files with 6 additions and 4 deletions

View File

@@ -739,7 +739,7 @@
* @property {ol.Extent|undefined} extent Extent.
* @property {boolean|undefined} hidpi Use the `ol.Map#pixelRatio` value when
* requesting the image from the remote server. Default is `true`.
* @property {ol.source.wms.ServerType|undefined} serverType The type of the remote WMS
* @property {ol.source.wms.ServerType|string|undefined} serverType The type of the remote WMS
* server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
* Default is `undefined`.
* @property {string|undefined} logo Logo.
@@ -818,7 +818,7 @@
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
* @property {number|undefined} maxZoom Maximum zoom.
* @property {ol.proj.ProjectionLike} projection Projection.
* @property {ol.source.wms.ServerType|undefined} serverType The type of the remote WMS
* @property {ol.source.wms.ServerType|string|undefined} serverType The type of the remote WMS
* server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
* Default is `undefined`.
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional

View File

@@ -63,7 +63,8 @@ ol.source.ImageWMS = function(opt_options) {
* @private
* @type {ol.source.wms.ServerType|undefined}
*/
this.serverType_ = options.serverType;
this.serverType_ =
/** @type {ol.source.wms.ServerType|undefined} */ (options.serverType);
/**
* @private

View File

@@ -84,7 +84,8 @@ ol.source.TileWMS = function(opt_options) {
* @private
* @type {ol.source.wms.ServerType|undefined}
*/
this.serverType_ = options.serverType;
this.serverType_ =
/** @type {ol.source.wms.ServerType|undefined} */ (options.serverType);
/**
* @private