diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-04-08 17:58:34 +0300 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-04-17 15:04:08 +0300 |
commit | e329492f0f830eff9e482cf4f62ea31c41d5d6c8 (patch) | |
tree | 0e6920e92d0ed80def095a64a1c6c04e6503e6ba | |
parent | d89b13f9555b3cde33499ed7bcece20c166e4dfd (diff) | |
download | qtlocation-mapboxgl-e329492f0f830eff9e482cf4f62ea31c41d5d6c8.tar.gz |
[core] Add 'auto' enum value to symbol-z-order layout property
-rw-r--r-- | include/mbgl/style/types.hpp | 1 | ||||
-rw-r--r-- | scripts/style-spec.js | 2 | ||||
-rw-r--r-- | src/mbgl/style/layers/symbol_layer_properties.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/types.cpp | 1 |
4 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 628e0d2395..13a2e50f01 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -70,6 +70,7 @@ enum class SymbolPlacementType : uint8_t { }; enum class SymbolZOrderType : uint8_t { + Auto, ViewportY, Source }; diff --git a/scripts/style-spec.js b/scripts/style-spec.js index b2686a6a77..19b7378cf8 100644 --- a/scripts/style-spec.js +++ b/scripts/style-spec.js @@ -2,5 +2,3 @@ var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8 // Make temporary modifications here when Native doesn't have all features that JS has. delete spec.layout_symbol['symbol-sort-key']; -delete spec.layout_symbol['symbol-z-order'].values['auto']; -spec.layout_symbol['symbol-z-order'].default = 'viewport-y';
\ No newline at end of file diff --git a/src/mbgl/style/layers/symbol_layer_properties.hpp b/src/mbgl/style/layers/symbol_layer_properties.hpp index cf8a9ab0d0..6b6e86fc3e 100644 --- a/src/mbgl/style/layers/symbol_layer_properties.hpp +++ b/src/mbgl/style/layers/symbol_layer_properties.hpp @@ -29,7 +29,7 @@ struct SymbolAvoidEdges : LayoutProperty<bool> { struct SymbolZOrder : LayoutProperty<SymbolZOrderType> { static constexpr const char *name() { return "symbol-z-order"; } - static SymbolZOrderType defaultValue() { return SymbolZOrderType::ViewportY; } + static SymbolZOrderType defaultValue() { return SymbolZOrderType::Auto; } }; struct IconAllowOverlap : LayoutProperty<bool> { diff --git a/src/mbgl/style/types.cpp b/src/mbgl/style/types.cpp index 889f6029e2..f388a9385f 100644 --- a/src/mbgl/style/types.cpp +++ b/src/mbgl/style/types.cpp @@ -78,6 +78,7 @@ MBGL_DEFINE_ENUM(SymbolAnchorType, { }); MBGL_DEFINE_ENUM(SymbolZOrderType, { + { SymbolZOrderType::Auto, "auto" }, { SymbolZOrderType::ViewportY, "viewport-y" }, { SymbolZOrderType::Source, "source" } }); |