summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-09-27 15:39:21 +0300
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-09-27 17:09:45 +0300
commitbb9b1ab62438f733ad278cb03f781116b9f3d721 (patch)
tree68afda0d516419eecb4d29601b9ff36f3487eed2 /include/mbgl
parentd90b2bb6dc2a19961e029963e591d702f70dd721 (diff)
downloadqtlocation-mapboxgl-bb9b1ab62438f733ad278cb03f781116b9f3d721.tar.gz
[core] Return enum layer property values as string
The output of Layer::getProperty is a mapbox::base::Value which is equivalent to JSON. When setting the value of an enum property via JSON its value would be a string, so it would be natural to return a string too. Also, the numbers generated depend on the enum definition. They are not part of the style spec.
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/style/conversion_impl.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp
index 3e4236949e..3e1b8455e5 100644
--- a/include/mbgl/style/conversion_impl.hpp
+++ b/include/mbgl/style/conversion_impl.hpp
@@ -327,7 +327,7 @@ struct ValueFactory<T, typename std::enable_if<(!std::is_enum<T>::value && !is_l
template <typename T>
struct ValueFactory<T, typename std::enable_if<std::is_enum<T>::value>::type> {
- static Value make(T arg) { return {int64_t(arg)}; }
+ static Value make(T arg) { return {Enum<T>::toString(arg)}; }
};
template <typename T>