@@ -313,6 +313,42 @@ extension MTMapView: MTNavigable {
313313 runCommandWithDoubleReturnValue ( GetPitch ( ) , completion: completionHandler)
314314 }
315315
316+ /// Returns the map's maximum pitch (tilt).
317+ ///
318+ /// The map's maximum pitch, measured in degrees away from the plane of the screen.
319+ /// - Parameter completionHandler: A handler block to execute when function finishes.
320+ @available ( iOS, deprecated: 16.0 , message: " Prefer the async version for modern concurrency handling " )
321+ public func getMaxPitch( completionHandler: @escaping ( Result < Double , MTError > ) -> Void ) {
322+ runCommandWithDoubleReturnValue ( GetMaxPitch ( ) , completion: completionHandler)
323+ }
324+
325+ /// Returns the map's maximum zoom.
326+ ///
327+ /// The map's maximum zoom level.
328+ /// - Parameter completionHandler: A handler block to execute when function finishes.
329+ @available ( iOS, deprecated: 16.0 , message: " Prefer the async version for modern concurrency handling " )
330+ public func getMaxZoom( completionHandler: @escaping ( Result < Double , MTError > ) -> Void ) {
331+ runCommandWithDoubleReturnValue ( GetMaxZoom ( ) , completion: completionHandler)
332+ }
333+
334+ /// Returns the map's minimum pitch (tilt).
335+ ///
336+ /// The map's minimum pitch, measured in degrees away from the plane of the screen.
337+ /// - Parameter completionHandler: A handler block to execute when function finishes.
338+ @available ( iOS, deprecated: 16.0 , message: " Prefer the async version for modern concurrency handling " )
339+ public func getMinPitch( completionHandler: @escaping ( Result < Double , MTError > ) -> Void ) {
340+ runCommandWithDoubleReturnValue ( GetMinPitch ( ) , completion: completionHandler)
341+ }
342+
343+ /// Returns the map's minimum zoom.
344+ ///
345+ /// The map's minimum zoom level.
346+ /// - Parameter completionHandler: A handler block to execute when function finishes.
347+ @available ( iOS, deprecated: 16.0 , message: " Prefer the async version for modern concurrency handling " )
348+ public func getMinZoom( completionHandler: @escaping ( Result < Double , MTError > ) -> Void ) {
349+ runCommandWithDoubleReturnValue ( GetMinZoom ( ) , completion: completionHandler)
350+ }
351+
316352 /// Pans the map by the specified offset.
317353 /// - Parameters:
318354 /// - offset: The x and y coordinates by which to pan the map.
@@ -624,6 +660,70 @@ extension MTMapView {
624660 }
625661 }
626662
663+ /// Returns the map's maximum pitch (tilt).
664+ ///
665+ /// The map's maximum pitch, measured in degrees away from the plane of the screen.
666+ public func getMaxPitch( ) async -> Double {
667+ await withCheckedContinuation { continuation in
668+ getMaxPitch { result in
669+ switch result {
670+ case . success( let result) :
671+ continuation. resume ( returning: result)
672+ case . failure:
673+ continuation. resume ( returning: . nan)
674+ }
675+ }
676+ }
677+ }
678+
679+ /// Returns the map's maximum zoom.
680+ ///
681+ /// The map's maximum zoom level.
682+ public func getMaxZoom( ) async -> Double {
683+ await withCheckedContinuation { continuation in
684+ getMaxZoom { result in
685+ switch result {
686+ case . success( let result) :
687+ continuation. resume ( returning: result)
688+ case . failure:
689+ continuation. resume ( returning: . nan)
690+ }
691+ }
692+ }
693+ }
694+
695+ /// Returns the map's minimum pitch (tilt).
696+ ///
697+ /// The map's minimum pitch, measured in degrees away from the plane of the screen.
698+ public func getMinPitch( ) async -> Double {
699+ await withCheckedContinuation { continuation in
700+ getMinPitch { result in
701+ switch result {
702+ case . success( let result) :
703+ continuation. resume ( returning: result)
704+ case . failure:
705+ continuation. resume ( returning: . nan)
706+ }
707+ }
708+ }
709+ }
710+
711+ /// Returns the map's minimum zoom.
712+ ///
713+ /// The map's minimum zoom level.
714+ public func getMinZoom( ) async -> Double {
715+ await withCheckedContinuation { continuation in
716+ getMinZoom { result in
717+ switch result {
718+ case . success( let result) :
719+ continuation. resume ( returning: result)
720+ case . failure:
721+ continuation. resume ( returning: . nan)
722+ }
723+ }
724+ }
725+ }
726+
627727 /// Pans the map by the specified offset.
628728 /// - Parameters:
629729 /// - offset: The x and y coordinates by which to pan the map.
0 commit comments