summaryrefslogtreecommitdiff
path: root/platform/android/src/style/sources/custom_geometry_source.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/style/sources/custom_geometry_source.hpp')
-rw-r--r--platform/android/src/style/sources/custom_geometry_source.hpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/platform/android/src/style/sources/custom_geometry_source.hpp b/platform/android/src/style/sources/custom_geometry_source.hpp
index 801f81b089..52e4027dd8 100644
--- a/platform/android/src/style/sources/custom_geometry_source.hpp
+++ b/platform/android/src/style/sources/custom_geometry_source.hpp
@@ -15,37 +15,34 @@ namespace android {
class CustomGeometrySource : public Source {
public:
-
+ using SuperTag = Source;
static constexpr auto Name() { return "com/mapbox/mapboxsdk/style/sources/CustomGeometrySource"; };
- static jni::Class<CustomGeometrySource> javaClass;
-
static void registerNative(jni::JNIEnv&);
- CustomGeometrySource(jni::JNIEnv&, jni::String, jni::Object<>);
-
+ CustomGeometrySource(jni::JNIEnv&, const jni::String&, const jni::Object<>&);
CustomGeometrySource(jni::JNIEnv&, mbgl::style::Source&, AndroidRendererFrontend&);
-
~CustomGeometrySource();
- bool removeFromMap(JNIEnv&, jni::Object<Source>, mbgl::Map&) override;
- void addToMap(JNIEnv&, jni::Object<Source>, mbgl::Map&, AndroidRendererFrontend&) override;
+ bool removeFromMap(JNIEnv&, const jni::Object<Source>&, mbgl::Map&) override;
+ void addToMap(JNIEnv&, const jni::Object<Source>&, mbgl::Map&, AndroidRendererFrontend&) override;
void fetchTile(const mbgl::CanonicalTileID& tileID);
void cancelTile(const mbgl::CanonicalTileID& tileID);
bool isCancelled(jni::jint z, jni::jint x, jni::jint y);
void startThreads();
void releaseThreads();
- void setTileData(jni::JNIEnv& env, jni::jint z, jni::jint x, jni::jint y, jni::Object<geojson::FeatureCollection> jf);
+
+private:
+ void setTileData(jni::JNIEnv& env, jni::jint z, jni::jint x, jni::jint y, const jni::Object<geojson::FeatureCollection>& jf);
void invalidateTile(jni::JNIEnv& env, jni::jint z, jni::jint x, jni::jint y);
- void invalidateBounds(jni::JNIEnv& env, jni::Object<LatLngBounds> bounds);
+ void invalidateBounds(jni::JNIEnv& env, const jni::Object<LatLngBounds>& bounds);
- jni::Array<jni::Object<geojson::Feature>> querySourceFeatures(jni::JNIEnv&,
- jni::Array<jni::Object<>> );
+ jni::Local<jni::Array<jni::Object<geojson::Feature>>> querySourceFeatures(jni::JNIEnv&,
+ const jni::Array<jni::Object<>>& );
-private:
- jni::Object<Source> createJavaPeer(jni::JNIEnv&);
+ jni::Local<jni::Object<Source>> createJavaPeer(jni::JNIEnv&);
}; // class CustomGeometrySource