maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.03k stars 299 forks source link

Updating local mbtiles file causes crash #2523

Open nnhubbard opened 3 months ago

nnhubbard commented 3 months ago

This is a fix for issue #100 where updating a local mbtiles file with a new version will cause a crash.

The use case for this is for users that have mbtiles files on the filesystem an update that with a newer version of the file, such as downloading an updated map file. Previously this would crash.

nnhubbard commented 3 months ago

Could you add a test?

I would be happy to, but is there documentation somewhere on how to do this?

louwers commented 3 months ago

You would need to add it here: https://github.com/maplibre/maplibre-native/blob/main/test/storage/mbtiles_file_source.test.cpp

What platform are you on? For CMake there is the mbgl-test-runner target (Linux, Windows), for iOS you need to run the CppUnitTests.

nnhubbard commented 3 months ago

You would need to add it here: https://github.com/maplibre/maplibre-native/blob/main/test/storage/mbtiles_file_source.test.cpp

What platform are you on? For CMake there is the mbgl-test-runner target (Linux, Windows), for iOS you need to run the CppUnitTests.

I am on iOS. Thanks for the tip on where to start.