From 81e47c7356bea0663b7fecc2d7ce8a1ed6b4f631 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 1 Aug 2024 11:43:47 +0300 Subject: [PATCH] Expose all MapOptions properties (#2249) --- CHANGELOG.md | 1 + .../MapboxMaps/Foundation/Extensions/Core/MapOptions.swift | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2a07b93c44f..2a6a25313af7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. * Expose new Standard Satellite style. Add new parameters to the Standard Style. * Fix bug where updating MapStyle didn't update the configuration properties. +* Expose getters for `MapOptions.orientation`, `MapOptions.constrainMode` and `MapOptions.viewportMode`. ## 11.6.0-beta.1 - 19 July, 2024 diff --git a/Sources/MapboxMaps/Foundation/Extensions/Core/MapOptions.swift b/Sources/MapboxMaps/Foundation/Extensions/Core/MapOptions.swift index 529927e67bff..6e5f9c9a15df 100644 --- a/Sources/MapboxMaps/Foundation/Extensions/Core/MapOptions.swift +++ b/Sources/MapboxMaps/Foundation/Extensions/Core/MapOptions.swift @@ -69,18 +69,18 @@ extension MapOptions { /// The map constrain mode. This can be used to limit the map to wrap around /// the globe horizontally. Default is `.heightOnly`. - var constrainMode: ConstrainMode { + public var constrainMode: ConstrainMode { return __constrainMode?.intValueAsRawRepresentable() ?? .heightOnly } /// The viewport mode. This can be used to flip the vertical orientation of /// the map as some devices may use inverted orientation. - var viewportMode: ViewportMode? { + public var viewportMode: ViewportMode? { return __viewportMode?.intValueAsRawRepresentable() } /// The orientation of the Map. Default is `.upwards`. - var orientation: NorthOrientation { + public var orientation: NorthOrientation { return __orientation?.intValueAsRawRepresentable() ?? .upwards }