Files
openlayers/lib/OpenLayers/Feature/WFS.js
crschmidt fcd1c509e6 r408@creusa: crschmidt | 2006-05-27 12:44:36 -0400
Commit change to Feature prototype call, reordering to put id last.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@432 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-27 19:17:48 +00:00

48 lines
1.2 KiB
JavaScript

/**
* @class
*/
OpenLayers.Feature.WFS = Class.create();
OpenLayers.Feature.WFS.prototype =
Object.extend( new OpenLayers.Feature(), {
/**
* @constructor
*
* @param {OpenLayers.Layer} layer
* @param {XMLNode} xmlNode
*/
initialize: function(layer, xmlNode) {
var newArguments = arguments;
if (arguments.length > 0) {
var data = this.processXMLNode(xmlNode);
newArguments = new Array(layer, data.lonlat, data, data.id)
}
OpenLayers.Feature.prototype.initialize.apply(this, newArguments);
if (arguments.length > 0) {
this.createMarker();
this.layer.addMarker(this.marker);
}
},
/**
* @param {XMLNode} xmlNode
*
* @returns Data Object with 'id', 'lonlat', and private properties set
* @type Object
*/
processXMLNode: function(xmlNode) {
//this should be overridden by subclasses
// must return an Object with 'id' and 'lonlat' values set
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Feature.WFS"
});