summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2020-04-20 11:33:46 +0300
committerzmiao <miao.zhao@mapbox.com>2020-04-22 15:53:08 +0300
commit8dac8f1150910dfc62759330c7e3dcdd7e5b53a2 (patch)
tree7c174aed15c65be5ff6eded3ae84c5a51b79bd0a /src/mbgl
parent75ebd4aa1090bae4f726c487832050b30dbe40b1 (diff)
downloadqtlocation-mapboxgl-8dac8f1150910dfc62759330c7e3dcdd7e5b53a2.tar.gz
[core] Distance expression: add unit tests for distance expression
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/style/expression/distance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/style/expression/distance.cpp b/src/mbgl/style/expression/distance.cpp
index 67a460b7d7..c4d0c7b56d 100644
--- a/src/mbgl/style/expression/distance.cpp
+++ b/src/mbgl/style/expression/distance.cpp
@@ -21,8 +21,8 @@
namespace mbgl {
namespace {
-const std::size_t MinPointsSize = 500;
-const std::size_t MinLinePointsSize = 200;
+const std::size_t MinPointsSize = 100;
+const std::size_t MinLinePointsSize = 50;
using BBox = std::array<double, 4>;
const BBox DefaultBBox = BBox{std::numeric_limits<double>::infinity(),
@@ -414,9 +414,9 @@ optional<Arguments> parseValue(const style::conversion::Convertible& value, styl
} else if (*input == "NauticalMiles") {
unit = mapbox::cheap_ruler::CheapRuler::Unit::NauticalMiles;
} else if (*input == "Yards") {
- unit = mapbox::cheap_ruler::CheapRuler::Unit::Kilometers;
+ unit = mapbox::cheap_ruler::CheapRuler::Unit::Yards;
} else if (*input == "Feet") {
- unit = mapbox::cheap_ruler::CheapRuler::Unit::Miles;
+ unit = mapbox::cheap_ruler::CheapRuler::Unit::Feet;
} else if (*input == "Inches") {
unit = mapbox::cheap_ruler::CheapRuler::Unit::Inches;
} else {