suggestion from #138
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1186 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -49,7 +49,7 @@ OpenLayers.Feature.WFS.prototype =
|
||||
//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 text = OpenLayers.Util.getXmlNodeValue(point[0]);
|
||||
var floats = text.split(",");
|
||||
|
||||
return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]),
|
||||
|
||||
@@ -1035,6 +1035,24 @@ OpenLayers.Util.getTagText = function (parent, item, index) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {XMLNode} node
|
||||
*
|
||||
* @returns The text value of the given node, without breaking in firefox or IE
|
||||
* @type String
|
||||
*/
|
||||
OpenLayers.Util.getXmlNodeValue = function(node) {
|
||||
var val = null;
|
||||
Try.these(
|
||||
function() {
|
||||
val = node.text;
|
||||
},
|
||||
function() {
|
||||
val = node.textContent;
|
||||
});
|
||||
return val;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
* @param {HTMLDivElement} div
|
||||
|
||||
Reference in New Issue
Block a user