Adding getVertices method to all geometries. Call with nodesOnly true if you only want endpoints (of lines and multilines). r=crschmidt (closes #1192)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8842 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -184,6 +184,16 @@
|
||||
"equals() returns false for a geometry with offset y");
|
||||
}
|
||||
|
||||
function test_getVertices(t) {
|
||||
t.plan(3);
|
||||
|
||||
var point = new OpenLayers.Geometry.Point(10, 20);
|
||||
var verts = point.getVertices();
|
||||
t.ok(verts instanceof Array, "got back an array");
|
||||
t.eq(verts.length, 1, "of length 1");
|
||||
t.geom_eq(verts[0], point, "with correct geometry");
|
||||
}
|
||||
|
||||
function test_Point_clone(t) {
|
||||
t.plan(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user