blob: 748fe7361eb55d2b6d5f68387bab30755f8d407c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <mapbox/geojson.hpp>
#include <mbgl/style/conversion.hpp>
#include <mbgl/style/conversion/geojson.hpp>
#include <jni/jni.hpp>
namespace mbgl {
namespace style {
namespace conversion {
template <>
optional<GeoJSON> Converter<GeoJSON>::operator()(const mbgl::android::Value& value, Error& error) const {
if(value.isNull() || !value.isString()) {
error = { "no json data found" };
return {};
}
return convert<GeoJSON>(value.toString(), error);
}
} // namespace conversion
} // namespace style
} // namespace mbgl
|