💥 Breaking changes
-
Raise the minimum supported iOS version to 15.5, remove the filesystem polyfill, and clean up obsolete compatibility code (#4648, #4656).
-
Replace the
Mapbox.humbrella header withMapLibre.h.MapLibre.xcframeworkno longer shipsMapbox.h(#4731).Migration guide
Swift: no changes needed. Keep using
import MapLibre.Objective-C: include
MapLibre.hinstead ofMapbox.h:// Before #include <Mapbox.h> // After #include <MapLibre.h>
#import <MapLibre/MapLibre.h>and, with modules enabled,@import MapLibre;also work.The
MapboxVersionNumberandMapboxVersionStringdeclarations fromMapbox.hwere not carried over toMapLibre.h. These symbols were never defined in the binary, so referencing them caused a linker error. To get the SDK version at runtime, read it from the framework bundle:NSString *version = [NSBundle bundleForClass:[MLNMapView class]] .infoDictionary[@"CFBundleShortVersionString"];
let version = Bundle(for: MLNMapView.self) .infoDictionary?["CFBundleShortVersionString"] as? String
Plugin API
MapLibre iOS now has an experimental C plugin API for extending MapLibre with native code, defined in plugin_api.h. It currently supports adding custom style layer types. It is only available in the build of MapLibre iOS that is distributed as the separate Swift package maplibre/maplibre-ios-with-plugin-api, whose MapLibre product replaces the standard one. See Plugin API for how to use it (#4612, #4769). The announcement in the newsletter contains some inspiration for plugins.
We welcome ideas for extending the plugin API.
Features
- Add
-[MLNStyle setGlobalStateValue:forProperty:]andMLNStyle.globalStatefor theglobal-stateexpression and the rootstateproperty of the style (#4516). - Add the
interpolate-labandinterpolate-hclexpressions (#4668). - Add support for colorizing SDF
fill-patternimages withfill-color(#4551). - Add rendered feature introspection. With
MLNMapOptions.featureInfoEnabled,MLNRenderingStats.frameRenderedFeaturesreports the features rendered by each layer and their bounds, and-[MLNMapView renderedFeatureCountForFeatureID:LayerID:SourceID:]counts them (#4460). - Include device and simulator debug symbols in the dynamic XCFramework. The separate iOS debug-symbol ZIP is no longer published (#4698).
- Export
MLNBackendResourcefrom the dynamic framework when using the Metal renderer (#4731). - Make the set of available images copy-on-write, speeding up styles with many images and frequently updated sources (#4651).
- Avoid uploading the vertex data of
filllayers on every frame (#4765).
Bug fixes
- Size
line-patternimages like MapLibre GL JS. They were drawn about 1.7× bigger and stretched along the line (#4726). - Load
raster-demtiles at the rounded zoom level, like raster sources and MapLibre GL JS (#4650). - Fix
line-gradientbeing drawn asline-colorwhen combined withline-dasharray(#4725). - Fix the lighting of fill-extrusion walls on rotated maps (#4662).
- Fix the background layer disappearing after style changes (#4616).
- Fix changes to layer transition options and the style's transition options not being applied (#4677).
- Fix a crash when an image source lies wholly beyond the latitude limits of the map (#4753).
- Fix a crash when querying a custom geometry source before its first tile data arrives (#4718).
- Fix a race condition when releasing unused dynamic textures (#4817).
- Fix
invalidatePackon offline packs completing before the database operation finished and losing its error (#4760). - Fix resetting an in-memory offline database deleting a file of the same name (#4720).
- Fix the cumulative draw call count in Metal rendering statistics (#4719).
- Use
@autoreleasepoolblocks on worker threads, so autoreleased objects such as Metal textures are released (#4621).