From 224d49cc9083f8ecb418a68ae0fea839bc51def6 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Tue, 17 Sep 2019 18:51:53 +0300 Subject: [core] Check layer compatibility with source --- src/mbgl/style/sources/geojson_source.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/mbgl/style/sources/geojson_source.cpp') diff --git a/src/mbgl/style/sources/geojson_source.cpp b/src/mbgl/style/sources/geojson_source.cpp index 72a51e212f..b1a5dd981a 100644 --- a/src/mbgl/style/sources/geojson_source.cpp +++ b/src/mbgl/style/sources/geojson_source.cpp @@ -1,9 +1,10 @@ +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include #include namespace mbgl { @@ -78,5 +79,11 @@ void GeoJSONSource::loadDescription(FileSource& fileSource) { }); } +bool GeoJSONSource::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"); +} + } // namespace style } // namespace mbgl -- cgit v1.2.1