diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp index 3e4236949..3e1b8455e 100644 --- a/include/mbgl/style/conversion_impl.hpp +++ b/include/mbgl/style/conversion_impl.hpp @@ -327,7 +327,7 @@ struct ValueFactory::value && !is_l template struct ValueFactory::value>::type> { - static Value make(T arg) { return {int64_t(arg)}; } + static Value make(T arg) { return {Enum::toString(arg)}; } }; template diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp index 5872f4ecd..6f0f126d3 100644 --- a/test/map/map.test.cpp +++ b/test/map/map.test.cpp @@ -1006,6 +1006,6 @@ TEST(Map, UniversalStyleGetter) { StyleProperty lineCap = lineLayer->getProperty("line-cap"); ASSERT_TRUE(lineCap.value); EXPECT_EQ(StyleProperty::Kind::Constant, lineCap.kind); - ASSERT_TRUE(lineCap.value.getInt()); - EXPECT_EQ(mbgl::underlying_type(mbgl::style::LineCapType::Butt), *lineCap.value.getInt()); -} \ No newline at end of file + ASSERT_TRUE(lineCap.value.getString()); + EXPECT_EQ(std::string("butt"), *lineCap.value.getString()); +}