[android] Fix JNI local ref overflow
Change test to 1000 markers For #2726
This commit is contained in:
@@ -887,6 +887,7 @@ jlongArray JNICALL nativeAddMarkers(JNIEnv *env, jobject obj, jlong nativeMapVie
|
||||
env->DeleteLocalRef(icon);
|
||||
|
||||
std::string id = std_string_from_jstring(env, jid);
|
||||
env->DeleteLocalRef(jid);
|
||||
|
||||
jdouble latitude = env->GetDoubleField(position, latLngLatitudeId);
|
||||
if (env->ExceptionCheck()) {
|
||||
@@ -2196,4 +2197,3 @@ extern "C" JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved) {
|
||||
theJVM = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BulkMarkerActivity extends AppCompatActivity {
|
||||
mMapView.onCreate(savedInstanceState);
|
||||
mMapView.setCenterCoordinate(new LatLngZoom(38.87031, -77.00897, 10));
|
||||
|
||||
new LoadBulkMarkerTask(mMapView, 250).execute();
|
||||
new LoadBulkMarkerTask(mMapView, 1000).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ const std::vector<std::pair<std::string, std::string>> defaultStyles = {
|
||||
{ "asset://styles/emerald-v8.json", "Emerald" },
|
||||
{ "asset://styles/light-v8.json", "Light" },
|
||||
{ "asset://styles/dark-v8.json", "Dark" },
|
||||
{ "asset://styles/satellite-v8.json", "Satellite" }
|
||||
{ "asset://styles/satellite-v8.json", "Satellite" },
|
||||
{ "asset://styles/satellite-hyrid-v8.json", "Satellite Streets" }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user