From bdc6fcf7dd4e9d7f40bda4d3ec7612186cc10bcf Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Thu, 9 Jan 2025 14:14:48 +0100 Subject: [PATCH] Prepare MapLibre iOS 6.10.0 release --- MODULE.bazel | 4 ++-- platform/darwin/src/MLNComputedShapeSource.h | 2 +- platform/darwin/src/MLNMapSnapshotter.h | 3 ++- platform/ios/CHANGELOG.md | 9 +++++++-- platform/ios/MapLibre.docc/MapLibre.md | 2 +- platform/ios/MapLibre.docc/PMTiles.md | 15 +++++++++++++++ platform/ios/src/MLNMapView.h | 5 ++--- platform/ios/src/MLNMapViewDelegate.h | 7 ++++--- 8 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 platform/ios/MapLibre.docc/PMTiles.md diff --git a/MODULE.bazel b/MODULE.bazel index 3cdd4ed1335..9684c906ac8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,9 +3,9 @@ module(name = "maplibre") bazel_dep(name = "apple_support", version = "1.17.0", repo_name = "build_bazel_apple_support") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.10") -bazel_dep(name = "rules_apple", version = "3.11.2", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "rules_apple", version = "3.16.1", repo_name = "build_bazel_rules_apple") bazel_dep(name = "rules_swift", version = "2.2.3", repo_name = "build_bazel_rules_swift") -bazel_dep(name = "rules_xcodeproj", version = "2.8.1") +bazel_dep(name = "rules_xcodeproj", version = "2.10.0") bazel_dep(name = "aspect_rules_js", version = "2.1.0") bazel_dep(name = "rules_nodejs", version = "6.3.2") bazel_dep(name = "libuv", version = "1.48.0") diff --git a/platform/darwin/src/MLNComputedShapeSource.h b/platform/darwin/src/MLNComputedShapeSource.h index 42f5dd65ee4..7f67d1229b9 100644 --- a/platform/darwin/src/MLNComputedShapeSource.h +++ b/platform/darwin/src/MLNComputedShapeSource.h @@ -125,12 +125,12 @@ MLN_EXPORT source cannot be clustered. @param identifier A string that uniquely identifies the source. + @param dataSource An object conforming to MLNComputedShapeSourceDataSource protocol that will provide the shape data. @param options An `NSDictionary` of options for this source. */ - (instancetype)initWithIdentifier:(NSString *)identifier dataSource:(id)dataSource options:(nullable NSDictionary *)options; - /** Invalidates all the features and properties intersecting with or contained in the specified bounds. New fetch requests will immediately be invoked on the diff --git a/platform/darwin/src/MLNMapSnapshotter.h b/platform/darwin/src/MLNMapSnapshotter.h index e0c6c6461a2..ef8352ede94 100644 --- a/platform/darwin/src/MLNMapSnapshotter.h +++ b/platform/darwin/src/MLNMapSnapshotter.h @@ -68,7 +68,8 @@ MLN_EXPORT @param styleURL URL of the map style to snapshot. The URL may be a full HTTP, HTTPS URL, canonical URL or a path to a local file relative to - the application’s resource path. Specify `nil` for the default style. + the application's resource path. Specify `nil` for the default style. + @param camera The camera representing the viewport visible in the snapshot. @param size The image size. */ - (instancetype)initWithStyleURL:(nullable NSURL *)styleURL diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 65ce874aee7..4586f7092b4 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -1,8 +1,13 @@ # Changelog for MapLibre Native for iOS -MapLibre welcomes participation and contributions from everyone. Please read [`Contributing Guide`](https://github.com/maplibre/maplibre-native/blob/master/CONTRIBUTING.md) to get started. +MapLibre welcomes participation and contributions from everyone. Please read [`MapLibre iOS Developer Guide`](https://maplibre.org/maplibre-native/docs/book/ios/index.html) to get started. -## main +## 6.10.0 + +- Fix icon label isn't centered with the icon for CJK/local glyphy on iOS ([#3108](https://github.com/maplibre/maplibre-native/pull/3108)). +- Add support for [PMTiles](https://docs.protomaps.com/pmtiles/) with `pmtiles://` URL scheme ([#2882](https://github.com/maplibre/maplibre-native/pull/2882)). +- Consolidate UBOs ([#3089](https://github.com/maplibre/maplibre-native/pull/3089)). +- Allow constraining camera to maximum bounds ([#2475](https://github.com/maplibre/maplibre-native/pull/2475)). ## 6.9.0 diff --git a/platform/ios/MapLibre.docc/MapLibre.md b/platform/ios/MapLibre.docc/MapLibre.md index ea0ec68f276..17a8230989a 100644 --- a/platform/ios/MapLibre.docc/MapLibre.md +++ b/platform/ios/MapLibre.docc/MapLibre.md @@ -30,6 +30,7 @@ Powerful, free and open-source mapping toolkit with full control over data sourc - - - +- ### Map Interaction @@ -52,7 +53,6 @@ Powerful, free and open-source mapping toolkit with full control over data sourc - - -- - - - diff --git a/platform/ios/MapLibre.docc/PMTiles.md b/platform/ios/MapLibre.docc/PMTiles.md new file mode 100644 index 00000000000..edf1c55c861 --- /dev/null +++ b/platform/ios/MapLibre.docc/PMTiles.md @@ -0,0 +1,15 @@ +# PMTiles + +Working with PMTiles + +Starting MapLibre iOS 6.10.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. + +![](pmtiles-demo.png) diff --git a/platform/ios/src/MLNMapView.h b/platform/ios/src/MLNMapView.h index 3965a261d10..a3a1ce7f7f0 100644 --- a/platform/ios/src/MLNMapView.h +++ b/platform/ios/src/MLNMapView.h @@ -1310,19 +1310,18 @@ vertically on the map. the user find his or her bearings even after traversing a great distance. @param camera The new viewpoint. + @param insets The minimum padding (in screen points) that would be visible + around the returned camera object if it were set as the receiver's camera. @param duration The amount of time, measured in seconds, that the transition animation should take. Specify `0` to jump to the new viewpoint instantaneously. Specify a negative value to use the default duration, which is based on the length of the flight path. - @param edgePadding The minimum padding (in screen points) that would be visible - around the returned camera object if it were set as the receiver’s camera. @param completion The block to execute after the animation finishes. */ - (void)flyToCamera:(MLNMapCamera *)camera edgePadding:(UIEdgeInsets)insets withDuration:(NSTimeInterval)duration completionHandler:(nullable void (^)(void))completion; - /** Returns the camera that best fits the given coordinate bounds. diff --git a/platform/ios/src/MLNMapViewDelegate.h b/platform/ios/src/MLNMapViewDelegate.h index 4ade8612b50..346dbc5fd93 100644 --- a/platform/ios/src/MLNMapViewDelegate.h +++ b/platform/ios/src/MLNMapViewDelegate.h @@ -245,9 +245,9 @@ NS_ASSUME_NONNULL_BEGIN affecting performance. @param mapView The map view that has just redrawn. + @param fullyRendered A Boolean value indicating whether the map is fully rendered or not. */ - (void)mapViewDidFinishRenderingFrame:(MLNMapView *)mapView fullyRendered:(BOOL)fullyRendered; - /** Tells the delegate that the map view has just redrawn. @@ -258,13 +258,14 @@ NS_ASSUME_NONNULL_BEGIN affecting performance. @param mapView The map view that has just redrawn. - @param frameTimeNanos The time taken to render the frame, in nanoseconds + @param fullyRendered A Boolean value indicating whether the map is fully rendered or not. + @param frameEncodingTime The time taken to encode the frame, in milliseconds. + @param frameRenderingTime The time taken to render the frame, in milliseconds. */ - (void)mapViewDidFinishRenderingFrame:(MLNMapView *)mapView fullyRendered:(BOOL)fullyRendered frameEncodingTime:(double)frameEncodingTime frameRenderingTime:(double)frameRenderingTime; - /** Tells the delegate that the map view is entering an idle state, and no more drawing will be necessary until new data is loaded or there is some interaction