Files
MapLibreParticleLab/include/mln/style/conversion/geojson.hpp
Bart Louwers 2a8ebc4906 core: rename mbgl directories to mln (#4511)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-08-22 20:50:14 +02:00

31 lines
824 B
C++

#pragma once
#include <mln/util/geojson.hpp>
#include <mln/style/conversion.hpp>
#include <optional>
#include <string>
namespace mln {
namespace style {
namespace conversion {
// Workaround until https://github.com/mapbox/mapbox-gl-native/issues/5623 is done.
std::optional<GeoJSON> parseGeoJSON(const std::string&, Error&);
// Serialize a GeoJSON value back to a JSON string. This is the public
// counterpart to parseGeoJSON: consumers that link the core through the
// amalgam (which exports only mln::* symbols) cannot reach the bundled
// mapbox::geojson::stringify directly.
std::string stringifyGeoJSON(const GeoJSON&);
template <>
struct Converter<GeoJSON> {
public:
std::optional<GeoJSON> operator()(const Convertible&, Error&) const;
};
} // namespace conversion
} // namespace style
} // namespace mln