stadiamaps / flutter-maplibre-gl-example Goto Github PK
View Code? Open in Web Editor NEWAn example illustrating the MapLibre GL Native wrapper for Flutter
License: BSD 3-Clause "New" or "Revised" License
An example illustrating the MapLibre GL Native wrapper for Flutter
License: BSD 3-Clause "New" or "Revised" License
Hello,
I'd like to use the app while the device offline but I got black screen. The logs are bellow.
Launching lib\main.dart on sdk gphone x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
โ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app-debug.apk...
Debug service listening on ws://127.0.0.1:54627/hhXvahhHvmw=/ws
Syncing files to device sdk gphone x86 64...
I/e.maplibre_demo( 4955): Compiler allocated 4533KB to compile void android.view.ViewRootImpl.performTraversals()
E/Mbgl ( 4955): {DatabaseFileSou}[Database](11): Can't open database: database disk image is malformed
W/Mbgl ( 4955): {DatabaseFileSou}[Database]: Removing existing incompatible offline database
W/Parcel ( 4955): Expecting binder but got null!
I/flutter ( 4955): ----------------- installOfflineMapTiles worked
I/flutter ( 4955): _tilesLoaded--->true
I/PlatformViewsController( 4955): Hosting view in view hierarchy for platform view: 0
E/FrameEvents( 4955): updateAcquireFence: Did not find frame.
W/Parcel ( 4955): Expecting binder but got null!
V/Mbgl-ConnectivityReceiver( 4955): connected - false
E/FrameEvents( 4955): updateAcquireFence: Did not find frame.
I/Mbgl-EGLConfigChooser( 4955): In emulator: false
D/HostConnection( 4955): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_1
D/EGL_emulation( 4955): eglCreateContext: 0x78a63621b690: maj 3 min 1 rcv 4
D/EGL_emulation( 4955): eglMakeCurrent: 0x78a63621b690: ver 3 1 (tinfo 0x78a852040280) (first time)
I/Mbgl ( 4955): {Thread-4}[General]: GPU Identifier: Android Emulator OpenGL ES Translator (NVIDIA GeForce GTX 1660/PCIe/SSE2)
E/FrameEvents( 4955): updateAcquireFence: Did not find frame.
E/FrameEvents( 4955): updateAcquireFence: Did not find frame.
The modified code is bellow;
bool _tilesLoaded = false;
_copyTilesIntoPlace() async {
try {
await installOfflineMapTiles("assets/cache.db");
print("----------------- installOfflineMapTiles worked");
} catch (err) {
print(err);
}
setState(() {
this._tilesLoaded = true;
});
print("_tilesLoaded--->" + _tilesLoaded.toString());
}
@override
void initState() {
_copyTilesIntoPlace();
super.initState();
}
When I run the app twice, cache.db loaded successfully.
I don't know how to load it properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.