EncodedPolyline: Allow setting geometryType to "point

This commit is contained in:
Tobias Bieniek
2012-12-27 23:19:44 +01:00
parent c118d9884d
commit 8651e05e75
2 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -51,7 +51,7 @@
}
function test_Format_EncodedPolyline_read(t) {
t.plan(4);
t.plan(5);
var format = new OpenLayers.Format.EncodedPolyline();
@@ -71,6 +71,10 @@
format.geometryType = "polygon";
t.ok(polygon.geometry.equals(format.read(encoded).geometry),
"format correctly reads encoded polygon");
format.geometryType = "point";
t.ok(points[0].equals(format.read(encoded).geometry),
"format correctly reads encoded point");
}
function test_Format_EncodedPolyline_decode(t) {