[core] Add 'auto' enum value to symbol-z-order layout property

This commit is contained in:
Alexander Shalamov
2019-04-08 17:58:34 +03:00
parent d89b13f955
commit e329492f0f
4 changed files with 3 additions and 3 deletions

View File

@@ -70,6 +70,7 @@ enum class SymbolPlacementType : uint8_t {
};
enum class SymbolZOrderType : uint8_t {
Auto,
ViewportY,
Source
};

View File

@@ -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';

View File

@@ -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> {

View File

@@ -78,6 +78,7 @@ MBGL_DEFINE_ENUM(SymbolAnchorType, {
});
MBGL_DEFINE_ENUM(SymbolZOrderType, {
{ SymbolZOrderType::Auto, "auto" },
{ SymbolZOrderType::ViewportY, "viewport-y" },
{ SymbolZOrderType::Source, "source" }
});