Getting the nanometer precision we deserve with web mercator

This commit is contained in:
Tim Schaub
2013-01-21 10:52:17 -07:00
parent 3cf3ef629c
commit 216d30ddc1
7 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
goog.provide('ol.geom.LineString');
goog.require('goog.asserts');
goog.require('goog.vec.Float32Array');
goog.require('goog.vec.Float64Array');
goog.require('ol.geom.CoordinateArray');
goog.require('ol.geom.Geometry');
@@ -21,9 +21,9 @@ ol.geom.LineString = function(coordinates) {
length = count * dimension;
/**
* @type {Float32Array}
* @type {Float64Array}
*/
this.coordinates = new Float32Array(length);
this.coordinates = new Float64Array(length);
for (var i = 0; i < count; ++i) {
goog.asserts.assert(coordinates[i].length === dimension);
this.coordinates.set(coordinates[i], i * dimension);