Files
MapLibreParticleLab/platform/ios/app-swift/Sources/SimpleMapView.swift
2024-05-12 23:44:44 +02:00

22 lines
442 B
Swift

import MapLibre
import SwiftUI
import UIKit
// #-example-code(SimpleMapView)
struct SimpleMapView: UIViewRepresentable {
func makeUIView(context _: Context) -> MLNMapView {
let mapView = MLNMapView()
return mapView
}
func updateUIView(_: MLNMapView, context _: Context) {}
}
// #-end-example-code
struct ContentView: View {
var body: some View {
SimpleMapView().edgesIgnoringSafeArea(.all)
}
}