Format/EncodedPolyline: Change default factor to 1e5

This matches the factors in the other methods and the default of the
original algorithm. Having this set at 1 before can be considered
as a bug.
This commit is contained in:
Tobias Bieniek
2013-05-18 15:24:57 +02:00
committed by Bart van den Eijnden
parent 4399ebcb04
commit d1b00824fc
2 changed files with 5 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
* coordinates.
*/
decode: function(encoded, dims, opt_factor) {
var factor = opt_factor || 1;
var factor = opt_factor || 1e5;
var flatPoints = this.decodeDeltas(encoded, dims, factor);
var flatPointsLength = flatPoints.length;
@@ -179,7 +179,7 @@ OpenLayers.Format.EncodedPolyline = OpenLayers.Class(OpenLayers.Format, {
* {String} An encoded string
*/
encode: function (points, dims, opt_factor) {
var factor = opt_factor || 1;
var factor = opt_factor || 1e5;
var flatPoints = [];
var pointsLength = points.length;