From 3b2dce1057e424b0c3890bd421daa2a1cbd17038 Mon Sep 17 00:00:00 2001 From: Jacob Fielding Date: Sat, 2 Mar 2024 08:36:47 -0800 Subject: [PATCH] Corrected wierd comments on line breaks --- Sources/MapLibreSwiftUI/Examples/Other.swift | 9 +++------ Sources/MapLibreSwiftUI/MapViewCoordinator.swift | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Sources/MapLibreSwiftUI/Examples/Other.swift b/Sources/MapLibreSwiftUI/Examples/Other.swift index c8b1adb..0d155ad 100644 --- a/Sources/MapLibreSwiftUI/Examples/Other.swift +++ b/Sources/MapLibreSwiftUI/Examples/Other.swift @@ -23,17 +23,14 @@ import SwiftUI } // Demonstrates how to use the unsafeMapModifier to set MLNMapView properties that have not been exposed as - // modifiers - // yet. + // modifiers yet. SymbolStyleLayer(identifier: "simple-symbols", source: pointSource) .iconImage(constant: UIImage(systemName: "mappin")!) } .unsafeMapViewModifier { mapView in // Not all properties have modifiers yet. Until they do, you can use this 'escape hatch' to the underlying - // MLNMapView. - // Be careful: if you modify properties that the DSL controls already, they may be overridden. This modifier is - // a - // "hack", not a final function. + // MLNMapView. Be careful: if you modify properties that the DSL controls already, they may be overridden. This + // modifier is a "hack", not a final function. mapView.logoView.isHidden = false mapView.compassViewPosition = .topLeft } diff --git a/Sources/MapLibreSwiftUI/MapViewCoordinator.swift b/Sources/MapLibreSwiftUI/MapViewCoordinator.swift index 369dce9..336412a 100644 --- a/Sources/MapLibreSwiftUI/MapViewCoordinator.swift +++ b/Sources/MapLibreSwiftUI/MapViewCoordinator.swift @@ -191,18 +191,15 @@ extension MapViewCoordinator: MLNMapViewDelegate { .userTrackingMode == .followWithCourse // If any of these are a mismatch, we know the camera is no longer following a desired method, so we should - // detach and - // revert - // to a .centered camera. - // If any one of these is true, the desired camera state still matches the mapView's userTrackingMode + // detach and revert to a .centered camera. If any one of these is true, the desired camera state still matches + // the mapView's userTrackingMode if isFollowing || isFollowingHeading || isFollowingCourse { // User tracking is still active, we can ignore camera updates until we unset/fail this boolean check return } // The user's desired camera is not a user tracking method, now we need to publish the MLNMapView's camera state - // to the - // MapView camera binding. + // to the MapView camera binding. parent.camera = .center(mapView.centerCoordinate, zoom: mapView.zoomLevel, reason: CameraChangeReason(reason))