feat(core): Add public stringifyGeoJSON to mbgl::style::conversion (#4345)
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#include <mbgl/style/conversion/json.hpp>
|
||||
#include <mbgl/style/conversion_impl.hpp>
|
||||
|
||||
#include <mapbox/geojson.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
namespace style {
|
||||
namespace conversion {
|
||||
@@ -14,6 +16,10 @@ std::optional<GeoJSON> parseGeoJSON(const std::string& value, Error& error) {
|
||||
return convertJSON<GeoJSON>(value, error);
|
||||
}
|
||||
|
||||
std::string stringifyGeoJSON(const GeoJSON& geojson) {
|
||||
return mapbox::geojson::stringify(geojson);
|
||||
}
|
||||
|
||||
} // namespace conversion
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user