Remove dimension property from geometries

This was only necessary when using the shared vertices structure.
This commit is contained in:
Tim Schaub
2013-09-25 16:51:34 +02:00
parent 563918d58d
commit 1aa83e133b
19 changed files with 5 additions and 216 deletions

View File

@@ -26,12 +26,6 @@ ol.geom.LineString = function(coordinates) {
*/
this.coordinates_ = coordinates;
/**
* @type {number}
*/
this.dimension = coordinates[0].length;
goog.asserts.assert(this.dimension >= 2);
/**
* @type {ol.Extent}
* @private
@@ -119,11 +113,10 @@ ol.geom.LineString.prototype.distanceFromCoordinate = function(coordinate) {
*/
ol.geom.LineString.prototype.transform = function(transform) {
var coordinates = this.getCoordinates();
var dimension = this.dimension;
var coord;
for (var i = 0, ii = coordinates.length; i < ii; ++i) {
coord = coordinates[i];
transform(coord, coord, dimension);
transform(coord, coord, coord.length);
}
this.bounds_ = null;
};