[core] Use LayerInfo::tileKind in sources
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <mbgl/style/source_observer.hpp>
|
||||
#include <mbgl/style/sources/vector_source.hpp>
|
||||
#include <mbgl/style/sources/vector_source_impl.hpp>
|
||||
#include <mbgl/tile/tile.hpp>
|
||||
#include <mbgl/util/constants.hpp>
|
||||
#include <mbgl/util/exception.hpp>
|
||||
#include <mbgl/util/mapbox.hpp>
|
||||
@@ -86,9 +87,7 @@ void VectorSource::loadDescription(FileSource& fileSource) {
|
||||
}
|
||||
|
||||
bool VectorSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) const {
|
||||
return !std::strcmp(info->type, "line") || !std::strcmp(info->type, "symbol") ||
|
||||
!std::strcmp(info->type, "circle") || !std::strcmp(info->type, "fill") ||
|
||||
!std::strcmp(info->type, "fill-extrusion") || !std::strcmp(info->type, "heatmap");
|
||||
return mbgl::underlying_type(Tile::Kind::Geometry) == mbgl::underlying_type(info->tileKind);
|
||||
}
|
||||
|
||||
} // namespace style
|
||||
|
||||
Reference in New Issue
Block a user