Made WFS at least display points by default.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@785 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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",
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user