[android] Fix JNI local ref overflow

Change test to 1000 markers
For #2726
This commit is contained in:
Leith Bade
2015-10-23 15:42:39 +11:00
parent f71d61fa91
commit 54762825b0
3 changed files with 3 additions and 3 deletions

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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" }
};