give WFS a featureClass and have it be set in the constructor
git-svn-id: http://svn.openlayers.org/trunk/openlayers@406 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -8,6 +8,9 @@ OpenLayers.Layer.WFS.prototype =
|
||||
Object.extend(new OpenLayers.Layer.Grid(),
|
||||
Object.extend(new OpenLayers.Layer.Markers(), {
|
||||
|
||||
/** @type Object */
|
||||
featureClass: null,
|
||||
|
||||
/** @final @type hash */
|
||||
DEFAULT_PARAMS: { service: "WFS",
|
||||
version: "1.0.0",
|
||||
@@ -21,10 +24,15 @@ OpenLayers.Layer.WFS.prototype =
|
||||
* @param {str} name
|
||||
* @param {str} url
|
||||
* @param {hash} params
|
||||
* @param {Object} featureClass
|
||||
*/
|
||||
initialize: function(name, url, params) {
|
||||
OpenLayers.Layer.Grid.prototype.initialize.apply(this, arguments);
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
|
||||
initialize: function(name, url, params, featureClass) {
|
||||
this.featureClass = featureClass;
|
||||
|
||||
var newArguments = new Array(name, url, params);
|
||||
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments);
|
||||
|
||||
OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user