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:
committed by
Bart van den Eijnden
parent
4399ebcb04
commit
d1b00824fc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user