mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 05:43:37 +00:00
[core] Allow overriding map metaserver URL and reset downloader cache
- Add custom meta server API. - Implement override. - Add reset hook and implement reset. - Expose reset from Storage. - Let JNI set URL and reset cache. Signed-off-by: NoelClick <dev@noel.click>
This commit is contained in:
committed by
Konstantin Pastbin
parent
b39631fe51
commit
6e7ba078c8
@@ -1505,6 +1505,22 @@ JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeGet3dMode(JNIEnv
|
||||
env->SetBooleanField(result, buildingsField, buildings);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetCustomMapDownloadUrl(JNIEnv * env, jclass,
|
||||
jstring url)
|
||||
{
|
||||
std::string const nativeUrl = jni::ToNativeString(env, url);
|
||||
GetPlatform().SetCustomMetaServerUrl(nativeUrl);
|
||||
|
||||
if (g_framework)
|
||||
{
|
||||
frm()->GetStorage().ResetMapDownloadMetaConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(LINFO, ("nativeSetCustomMapDownloadUrl: framework not created yet, skipping ResetMapDownloadMetaConfig"));
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetAutoZoomEnabled(JNIEnv * env, jclass,
|
||||
jboolean enabled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user