Experimental API to toggle tile cache in map view (#2590)

This commit is contained in:
Alex Cristici
2024-07-16 01:31:11 +03:00
committed by GitHub
parent 9119afc5a3
commit 1ae14a55d0
21 changed files with 93 additions and 4 deletions

View File

@@ -676,6 +676,10 @@ jni::Local<jni::Array<jni::jlong>> NativeMapView::addMarkers(jni::JNIEnv& env,
return result;
}
void NativeMapView::setTileCacheEnabled(JNIEnv&, jni::jboolean enabled) {
rendererFrontend->setTileCacheEnabled(enabled);
}
void NativeMapView::onLowMemory(JNIEnv&) {
rendererFrontend->reduceMemoryUse();
}
@@ -1284,6 +1288,7 @@ void NativeMapView::registerNative(jni::JNIEnv& env) {
METHOD(&NativeMapView::setDebug, "nativeSetDebug"),
METHOD(&NativeMapView::getDebug, "nativeGetDebug"),
METHOD(&NativeMapView::isFullyLoaded, "nativeIsFullyLoaded"),
METHOD(&NativeMapView::setTileCacheEnabled, "nativeSetTileCacheEnabled"),
METHOD(&NativeMapView::onLowMemory, "nativeOnLowMemory"),
METHOD(&NativeMapView::getMetersPerPixelAtLatitude, "nativeGetMetersPerPixelAtLatitude"),
METHOD(&NativeMapView::projectedMetersForLatLng, "nativeProjectedMetersForLatLng"),