// // MapWrapperView.swift // iosApp // // Created by Iván on 30/01/22. // Copyright © 2022 orgName. All rights reserved. // import SwiftUI import WhirlyGlobeMaplyComponent import shared struct MapWrapperView: View { @Binding var layer: MapLayer var body: some View { ZStack { // MARK: - Map BaseMapView(mapLayer: $layer) // MARK: - Attribution VStack { HyperlinkText(html: layer.attribution) .font(.footnote) .lineLimit(3) .foregroundColor(.label.opacity(0.35)) .padding() .background(.systemBackground.opacity(0.35)) } .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom) .allowsHitTesting(false) // MARK: - Controls VStack { Group { Button { print ("Zoom in!") } label: { Image(systemName: "plus") .imageScale(.large) } Button { print("Zoom out!") } label: { Image(systemName: "minus") .imageScale(.large) } } .frame(width: 50, height: 50) .foregroundColor(.primary) .background(.systemBackground) .clipShape(Circle()) } .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) .padding() } } }