summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/style/sources/geojson_source.hpp5
-rw-r--r--include/mbgl/style/sources/raster_source.hpp5
-rw-r--r--include/mbgl/style/sources/vector_source.hpp5
3 files changed, 15 insertions, 0 deletions
diff --git a/include/mbgl/style/sources/geojson_source.hpp b/include/mbgl/style/sources/geojson_source.hpp
index 37ddce1bcc..306a330252 100644
--- a/include/mbgl/style/sources/geojson_source.hpp
+++ b/include/mbgl/style/sources/geojson_source.hpp
@@ -50,5 +50,10 @@ public:
Impl* const impl;
};
+template <>
+inline bool Source::is<GeoJSONSource>() const {
+ return type == SourceType::GeoJSON;
+}
+
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/sources/raster_source.hpp b/include/mbgl/style/sources/raster_source.hpp
index 2d1d648eec..9bb951992c 100644
--- a/include/mbgl/style/sources/raster_source.hpp
+++ b/include/mbgl/style/sources/raster_source.hpp
@@ -16,5 +16,10 @@ public:
class Impl;
};
+template <>
+inline bool Source::is<RasterSource>() const {
+ return type == SourceType::Raster;
+}
+
} // namespace style
} // namespace mbgl
diff --git a/include/mbgl/style/sources/vector_source.hpp b/include/mbgl/style/sources/vector_source.hpp
index 3d53362734..e16a6a68af 100644
--- a/include/mbgl/style/sources/vector_source.hpp
+++ b/include/mbgl/style/sources/vector_source.hpp
@@ -16,5 +16,10 @@ public:
class Impl;
};
+template <>
+inline bool Source::is<VectorSource>() const {
+ return type == SourceType::Vector;
+}
+
} // namespace style
} // namespace mbgl