Skip to content

Commit

Permalink
Made WFS at least display points by default.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@785 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
  • Loading branch information
schuyler committed Jun 27, 2006
1 parent a80110a commit ea959e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion lib/OpenLayers/Feature/WFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ OpenLayers.Feature.WFS.prototype =
*/
processXMLNode: function(xmlNode) {
//this should be overridden by subclasses

// must return an Object with 'id' and 'lonlat' values set
var point = xmlNode.getElementsByTagName("Point");
var text = point[0].textContent;
var floats = text.split(",");

return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),
parseFloat(floats[1])),
id: null};

},

/** @final @type String */
Expand Down
4 changes: 2 additions & 2 deletions lib/OpenLayers/Layer/WFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OpenLayers.Layer.WFS.prototype =
Object.extend(new OpenLayers.Layer.Markers(), {

/** @type Object */
featureClass: null,
featureClass: OpenLayers.Feature.WFS,

/** @final @type hash */
DEFAULT_PARAMS: { service: "WFS",
Expand All @@ -30,7 +30,7 @@ OpenLayers.Layer.WFS.prototype =
* @param {Object} featureClass
*/
initialize: function(name, url, params, featureClass) {
this.featureClass = featureClass;
if (featureClass != null) this.featureClass = featureClass;

var newArguments = new Array();
if (arguments.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenLayers/Tile/WFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ OpenLayers.Tile.WFS.prototype =
doc = OpenLayers.parseXMLString(request.responseText);
}

var resultFeatures = OpenLayers.Util.getNodes(doc, "gml:featureMember");
var resultFeatures = doc.getElementsByTagName("featureMember");

//clear old featureList
this.features = new Array();
Expand Down

0 comments on commit ea959e5

Please sign in to comment.