summaryrefslogtreecommitdiff
path: root/platform/android/src/geojson/conversion/feature.hpp
blob: 031449cd2344155d99bb78929b33c0e140fda856 (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
25
26
27
28
29
30
31
32
33
#pragma once

#include "../../conversion/conversion.hpp"
#include "../feature.hpp"

#include <mbgl/util/feature.hpp>
#include <jni/jni.hpp>

#include <vector>
#include <unordered_map>

namespace mbgl {
namespace android {
namespace conversion {

template <>
struct Converter<jni::jobject*, std::unordered_map<std::string, mbgl::Value>> {
    Result<jni::jobject*> operator()(jni::JNIEnv& env, const std::unordered_map<std::string, mbgl::Value>& value) const;
};

template <>
struct Converter<jni::Object<android::geojson::Feature>, mbgl::Feature> {
    Result<jni::Object<android::geojson::Feature>> operator()(jni::JNIEnv& env, const mbgl::Feature& value) const;
};

template <>
struct Converter<jni::Array<jni::Object<android::geojson::Feature>>, std::vector<mbgl::Feature>> {
    Result<jni::Array<jni::Object<android::geojson::Feature>>> operator()(jni::JNIEnv& env, const std::vector<mbgl::Feature>& value) const;
};

} // namespace conversion
} // namespace android
} // namespace mbgl