[core] [android] Fix InfoWindow topOffsetPixels adjustment when switching styles

Fixes #2599
Make getTopOffsetPixelsForAnnotationSymbol private
Also implements MapChangeWillStartLoadingMap, MapChangeDidFinishLoadingMap
Paritally implements #630
This commit is contained in:
Leith Bade
2015-10-12 10:56:41 +11:00
parent 4ea8e4bc0a
commit 2ee7b02189
9 changed files with 109 additions and 49 deletions

View File

@@ -456,6 +456,13 @@ void JNICALL nativePause(JNIEnv *env, jobject obj, jlong nativeMapViewPtr) {
nativeMapView->pause();
}
jboolean JNICALL nativeIsPaused(JNIEnv *env, jobject obj, jlong nativeMapViewPtr) {
mbgl::Log::Debug(mbgl::Event::JNI, "nativeIsPaused");
assert(nativeMapViewPtr != 0);
NativeMapView *nativeMapView = reinterpret_cast<NativeMapView *>(nativeMapViewPtr);
return nativeMapView->getMap().isPaused();
}
void JNICALL nativeResume(JNIEnv *env, jobject obj, jlong nativeMapViewPtr) {
mbgl::Log::Debug(mbgl::Event::JNI, "nativeResume");
assert(nativeMapViewPtr != 0);
@@ -1690,6 +1697,7 @@ extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
reinterpret_cast<void *>(&nativeCreateSurface)},
{"nativeDestroySurface", "(J)V", reinterpret_cast<void *>(&nativeDestroySurface)},
{"nativePause", "(J)V", reinterpret_cast<void *>(&nativePause)},
{"nativeIsPaused", "(J)Z", reinterpret_cast<void *>(&nativeIsPaused)},
{"nativeResume", "(J)V", reinterpret_cast<void *>(&nativeResume)},
{"nativeUpdate", "(J)V", reinterpret_cast<void *>(&nativeUpdate)},
{"nativeRenderSync", "(J)V", reinterpret_cast<void *>(&nativeRenderSync)},