Files
MapLibreParticleLab/platform/node/src/node_geojson.hpp
Bruno de Oliveira Abinader e9914bf034 [node] Implement GeoJSON converter
2017-09-13 23:35:27 +03:00

18 lines
470 B
C++

#include <mbgl/style/conversion/geojson.hpp>
#include <string>
namespace mbgl {
namespace style {
namespace conversion {
template <>
optional<GeoJSON> Converter<GeoJSON>::operator()(const v8::Local<v8::Value>& value, Error& error) const {
Nan::JSON JSON;
std::string string = *Nan::Utf8String(JSON.Stringify(value->ToObject()).ToLocalChecked());
return convert<GeoJSON>(string, error);
}
} // namespace conversion
} // namespace style
} // namespace mbgl