revert previous commit. This is actually caused by a bug in Format.XML.

(See #1218)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5477 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-12-18 03:33:01 +00:00
parent 611cb91171
commit b2d12df117

View File

@@ -58,10 +58,6 @@
var format = new OpenLayers.Format.KML(options);
var features = format.read(kmlExpected);
var kmlOut = format.write(features);
if (OpenLayers.Util.getBrowserName() == "safari") {
t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");
kmlExpected = kmlExpected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');
}
t.eq(kmlOut, kmlExpected, "correctly writes an KML doc string");
}
@@ -87,10 +83,6 @@
feature = new OpenLayers.Feature.Vector(multi, {name: "test name"});
output = format.write(feature);
expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><Point><coordinates>0,1</coordinates></Point></MultiGeometry></Placemark></Folder></kml>';
if (OpenLayers.Util.getBrowserName() == "safari") {
t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");
expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');
}
t.eq(output, expected, "multipoint correctly written");
// test multilinestring
@@ -103,10 +95,6 @@
feature = new OpenLayers.Feature.Vector(multi, {name: "test name"});
output = format.write(feature);
expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><LineString><coordinates>1,0 0,1</coordinates></LineString></MultiGeometry></Placemark></Folder></kml>';
if (OpenLayers.Util.getBrowserName() == "safari") {
t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");
expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');
}
t.eq(output, expected, "multilinestring correctly written");
// test multipolygon
@@ -122,10 +110,6 @@
feature = new OpenLayers.Feature.Vector(multi, {name: "test name"});
output = format.write(feature);
expected = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>test output</description><Placemark><name>test name</name><description>No description available</description><MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>0,0 1,0 0,1 0,0</coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry></Placemark></Folder></kml>';
if (OpenLayers.Util.getBrowserName() == "safari") {
t.debug_print("Safari's XMLSerializer doesn't support XML namespaces.");
expected = expected.replace(/ xmlns[:a-z]*="[^"]*"/g, '');
}
t.eq(output, expected, "multilinestring correctly written");
}