Created
February 11, 2025 06:49
-
-
Save Koshimizu-Takehito/27827403ba21528f19727d4953572da8 to your computer and use it in GitHub Desktop.
MonotoneMap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import MapKit | |
struct MonotoneMap: View { | |
@State var position = MapCameraPosition.region( | |
MKCoordinateRegion( | |
center: CLLocationCoordinate2DMake(35.685175, 139.7528), | |
span: MKCoordinateSpan(latitudeDelta: 0.03, longitudeDelta: 0.03) | |
) | |
) | |
var body: some View { | |
Map(position: $position) | |
.overlay { | |
Rectangle() | |
.ignoresSafeArea() | |
.blendMode(.saturation) | |
.allowsHitTesting(false) | |
} | |
.compositingGroup() | |
.colorScheme(.light) | |
} | |
} | |
#Preview { | |
MonotoneMap() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment