diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index 2bedb5be327..c099845a347 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog MapLibre Native for Android +## 11.8.0 + +> [!NOTE] +> We are now releasing OpenGL ES and Vulkan variants of MapLibre Android. See the [11.7.0 release notes](https://github.com/maplibre/maplibre-native/releases/tag/android-v11.7.0) for details. + +### ✨ Features and improvements + +- Add PMTiles support ([#2882](https://github.com/maplibre/maplibre-native/pull/2882)). +- Consolidate UBOs ([#3089](https://github.com/maplibre/maplibre-native/pull/3089)). + +We have a new feature in the C++ Core to constrain the screen (instead of the center of the camera) to some bounds ([#2475](https://github.com/maplibre/maplibre-native/pull/2475)). This functionality still has to be exposed to Android. If you are interested in implementing this, see [this issue](https://github.com/maplibre/maplibre-native/issues/3128). + ## 11.7.1 > [!NOTE] diff --git a/platform/android/MapLibreAndroid/gradle.properties b/platform/android/MapLibreAndroid/gradle.properties index 93fed717d85..e012fd4356e 100644 --- a/platform/android/MapLibreAndroid/gradle.properties +++ b/platform/android/MapLibreAndroid/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=11.7.1 +VERSION_NAME=11.8.0 # Only build native dependencies for the current ABI # See https://code.google.com/p/android/issues/detail?id=221098#c20 diff --git a/platform/android/MapLibreAndroid/src/cpp/http_file_source.cpp b/platform/android/MapLibreAndroid/src/cpp/http_file_source.cpp index 4bd80f1e78f..13bc72a8b86 100644 --- a/platform/android/MapLibreAndroid/src/cpp/http_file_source.cpp +++ b/platform/android/MapLibreAndroid/src/cpp/http_file_source.cpp @@ -161,7 +161,7 @@ void HTTPRequest::onResponse(jni::JNIEnv& env, response.expires = util::parseTimestamp(jni::Make(env, expires).c_str()); } - if (code == 200) { + if (code == 200 || code == 206) { if (body) { auto data = std::make_shared(body.Length(env), char()); jni::GetArrayRegion(env, *body, 0, data->size(), reinterpret_cast(&(*data)[0])); diff --git a/platform/android/docs/data/PMTiles.md b/platform/android/docs/data/PMTiles.md new file mode 100644 index 00000000000..8fddcec5c53 --- /dev/null +++ b/platform/android/docs/data/PMTiles.md @@ -0,0 +1,15 @@ +# PMTiles + +Starting MapLibre Android 11.7.0, using [PMTiles](https://docs.protomaps.com/pmtiles/) as a data source is supported. You can prefix your vector tile source with `pmtiles://` to load a PMTiles file. The rest of the URL continue with be `https://` to load a remote PMTiles file, `asset://` to load an asset or `file://` to load a local PMTiles file. + +Oliver Wipfli has made a style available that combines a [Protomaps]() basemap togehter with Foursquare's POI dataset. It is available in the [wipfli/foursquare-os-places-pmtiles](https://github.com/wipfli/foursquare-os-places-pmtiles) repository on GitHub. The style to use is + +``` +https://raw.githubusercontent.com/wipfli/foursquare-os-places-pmtiles/refs/heads/main/style.json +``` + +The neat thing about this style is that it only uses PMTiles vector sources. PMTiles can be hosted with a relatively simple file server (or file hosting service) instead of a more complex specialized tile server. + +
+ ![Screenshot of PMTiles based style using Protomaps basemap with Foursquare POIs]({{ s3_url("pmtiles-demo.png") }}){ width="300" } +
\ No newline at end of file