summaryrefslogtreecommitdiff
path: root/platform/android/src/style/sources/geojson_source.hpp
blob: 5b529fc52a59e60ed125d5db31a1e6907f934862 (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
34
35
36
37
#pragma once

#include "source.hpp"
#include <mbgl/style/sources/geojson_source.hpp>
#include "../../geometry/feature.hpp"
#include <jni/jni.hpp>

namespace mbgl {
namespace android {

class GeoJSONSource : public Source {
public:

    static constexpr auto Name() { return "com/mapbox/mapboxsdk/style/sources/GeoJsonSource"; };

    static jni::Class<GeoJSONSource> javaClass;

    static void registerNative(jni::JNIEnv&);

    GeoJSONSource(jni::JNIEnv&, jni::String, jni::Object<>);

    GeoJSONSource(mbgl::Map&, mbgl::style::GeoJSONSource&);

    ~GeoJSONSource();

    void setGeoJSON(jni::JNIEnv&, jni::Object<>);

    void setURL(jni::JNIEnv&, jni::String);

    jni::Array<jni::Object<Feature>> querySourceFeatures(jni::JNIEnv&, jni::Array<jni::Object<>> jfilter);

    jni::jobject* createJavaPeer(jni::JNIEnv&);

}; // class GeoJSONSource

} // namespace android
} // namespace mbgl