[core] Add FadingTiles layer type property
This commit is contained in:
@@ -49,6 +49,12 @@ struct LayerTypeInfo {
|
||||
* requires clipping. Contains \c Clipping::NotRequired otherwise.
|
||||
*/
|
||||
const enum class Clipping { Required, NotRequired } clipping;
|
||||
|
||||
/**
|
||||
* @brief contains \c FadingTiles::Required if the corresponding layer type
|
||||
* requires rendering on fading tiles. Contains \c FadingTiles::NotRequired otherwise.
|
||||
*/
|
||||
const enum class FadingTiles { Required, NotRequired } fadingTiles;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* BackgroundLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* CircleLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace {
|
||||
LayerTypeInfo::Source::NotRequired,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired };
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired };
|
||||
} // namespace
|
||||
|
||||
CustomLayer::CustomLayer(const std::string& layerID,
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* FillExtrusionLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* FillLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::Clipping::Required
|
||||
LayerTypeInfo::Clipping::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* HeatmapLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* HillshadeLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::Required,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ let layerCapabilities = {};
|
||||
let defaults = { caps: { 'Source': 'NotRequired',
|
||||
'Pass3D': 'NotRequired',
|
||||
'Layout': 'NotRequired',
|
||||
'Clipping': 'NotRequired'
|
||||
'Clipping': 'NotRequired',
|
||||
'FadingTiles': 'NotRequired'
|
||||
},
|
||||
require: function(cap) {
|
||||
let copy = Object.assign({}, this);
|
||||
@@ -55,6 +56,7 @@ layerCapabilities['hillshade'] = defaults.require('Source')
|
||||
.finalize();
|
||||
layerCapabilities['symbol'] = defaults.require('Source')
|
||||
.require('Layout')
|
||||
.require('FadingTiles')
|
||||
.finalize();
|
||||
layerCapabilities['circle'] = defaults.require('Source').finalize();
|
||||
layerCapabilities['line'] = layerCapabilities['fill'];
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* LineLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::Clipping::Required
|
||||
LayerTypeInfo::Clipping::Required,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* RasterLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::NotRequired,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::NotRequired
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ const LayerTypeInfo* SymbolLayer::Impl::staticTypeInfo() noexcept {
|
||||
LayerTypeInfo::Source::Required,
|
||||
LayerTypeInfo::Pass3D::NotRequired,
|
||||
LayerTypeInfo::Layout::Required,
|
||||
LayerTypeInfo::Clipping::NotRequired
|
||||
LayerTypeInfo::Clipping::NotRequired,
|
||||
LayerTypeInfo::FadingTiles::Required
|
||||
};
|
||||
return &typeInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user