More context for url functions
With this change, url functions are called in the scope of the source they are configured for. This allows us to simplify the url function generation for WMS, using a more generic createFromParamsFunction factory, and the source's new params member. Note that there is also a new url member for WMS sources. This is the WMS base url (the first one in case there is an array of urls for faster tile access). This can be used for accessing other WMS services (especially GetFeatureInfo).
This commit is contained in:
@@ -1,6 +1,29 @@
|
||||
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