Less context
This change removes all changes that were anticipated here for WMS GetFeatureInfo handling, including the IWMS interface and the goog.provide for 'ol.tilegrid'. I'll create a separate pull request for WMS GetFeatureInfo eventually, taking into account the suggestions from the discussion in #402.
This commit is contained in:
@@ -82,7 +82,7 @@ goog.inherits(ol.source.ImageSource, ol.source.Source);
|
||||
ol.source.ImageSource.prototype.createImage =
|
||||
function(extent, resolution, size, projection) {
|
||||
var image = null;
|
||||
var imageUrl = this.imageUrlFunction.call(this, extent, size, projection);
|
||||
var imageUrl = this.imageUrlFunction(extent, size, projection);
|
||||
if (goog.isDef(imageUrl)) {
|
||||
image = new ol.Image(
|
||||
extent, resolution, imageUrl, this.crossOrigin_,
|
||||
|
||||
@@ -94,8 +94,7 @@ ol.source.ImageTileSource.prototype.getTile =
|
||||
} else {
|
||||
goog.asserts.assert(tileGrid);
|
||||
goog.asserts.assert(projection);
|
||||
var tileUrl = this.tileUrlFunction.call(this,
|
||||
tileCoord, tileGrid, projection);
|
||||
var tileUrl = this.tileUrlFunction(tileCoord, tileGrid, projection);
|
||||
var tile = new ol.ImageTile(
|
||||
tileCoord,
|
||||
goog.isDef(tileUrl) ? ol.TileState.IDLE : ol.TileState.EMPTY,
|
||||
|
||||
@@ -11,14 +11,13 @@ goog.require('ol.source.wms');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.source.IWMS}
|
||||
* @extends {ol.source.ImageSource}
|
||||
* @param {ol.source.SingleImageWMSOptions} options Options.
|
||||
*/
|
||||
ol.source.SingleImageWMS = function(options) {
|
||||
var imageUrlFunction = goog.isDef(options.url) ?
|
||||
ol.ImageUrlFunction.createFromParamsFunction(
|
||||
options.url, ol.source.wms.getUrl) :
|
||||
options.url, options.params, ol.source.wms.getUrl) :
|
||||
ol.ImageUrlFunction.nullImageUrlFunction;
|
||||
|
||||
goog.base(this, {
|
||||
@@ -30,16 +29,6 @@ ol.source.SingleImageWMS = function(options) {
|
||||
imageUrlFunction: imageUrlFunction
|
||||
});
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
this.url = options.url;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
this.params = options.params;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Image}
|
||||
|
||||
@@ -14,7 +14,6 @@ goog.require('ol.source.wms');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.source.IWMS}
|
||||
* @extends {ol.source.ImageTileSource}
|
||||
* @param {ol.source.TiledWMSOptions} tiledWMSOptions options.
|
||||
*/
|
||||
@@ -33,7 +32,7 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
var tileUrlFunctions = goog.array.map(
|
||||
urls, function(url) {
|
||||
return ol.TileUrlFunction.createFromParamsFunction(
|
||||
url, ol.source.wms.getUrl);
|
||||
url, tiledWMSOptions.params, ol.source.wms.getUrl);
|
||||
});
|
||||
tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||
tileUrlFunctions);
|
||||
@@ -68,16 +67,6 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
return new ol.TileCoord(tileCoord.z, x, tileCoord.y);
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
this.url = goog.isDef(urls) ? urls[0] : undefined;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
this.params = tiledWMSOptions.params;
|
||||
|
||||
goog.base(this, {
|
||||
attributions: tiledWMSOptions.attributions,
|
||||
crossOrigin: tiledWMSOptions.crossOrigin,
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
goog.provide('ol.source.IWMS');
|
||||
goog.provide('ol.source.wms');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Interface for WMS
|
||||
* @interface
|
||||
*/
|
||||
ol.source.IWMS = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {string|undefined} The url for this source.
|
||||
*/
|
||||
ol.source.IWMS.prototype.url;
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>} Parameters for WMS requests. 'LAYERS' is mandatory.
|
||||
* 'STYLES' defaults to ''. 'VERSION' defaults to '1.3.0'. 'CRS'/'SRS',
|
||||
* 'BBOX' and 'SIZE' are added dynamically.
|
||||
*/
|
||||
ol.source.IWMS.prototype.params;
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} baseUrl WMS base url.
|
||||
* @param {Object.<string, string|number>} params Request parameters.
|
||||
|
||||
Reference in New Issue
Block a user