Allow geometries to use a shared vertex array

The ol.geom.SharedVertices structure represents a flattened array of vertex coordinates.  This is intended to support optimal WebGL rendering.
This commit is contained in:
Tim Schaub
2013-03-02 18:39:24 +01:00
parent bdfa2cc88c
commit b52d283641
23 changed files with 1086 additions and 217 deletions

View File

@@ -76,8 +76,7 @@ describe('ol.parser.geojson', function() {
var obj = ol.parser.geojson.read(str);
expect(obj).toBeA(ol.geom.Point);
expect(obj.coordinates[0]).toBe(10);
expect(obj.coordinates[1]).toBe(20);
expect(obj.getCoordinates()).toEqual([10, 20]);
});
it('parses linestring', function() {
@@ -88,10 +87,7 @@ describe('ol.parser.geojson', function() {
var obj = ol.parser.geojson.read(str);
expect(obj).toBeA(ol.geom.LineString);
expect(obj.coordinates[0]).toBe(10);
expect(obj.coordinates[1]).toBe(20);
expect(obj.coordinates[2]).toBe(30);
expect(obj.coordinates[3]).toBe(40);
expect(obj.getCoordinates()).toEqual([[10, 20], [30, 40]]);
});
it('parses polygon', function() {