iOS Development

ios – Swift Recreate Apple Maps UI

Good day Id prefer to create the same interactive globe to Apples Apple Maps. I would love the map sort to be .normal but be capable to totally zoom out and present the total globe. Id additionally prefer to mimic apples app map UI as a lot as doable. If anybody is aware of of any libraries that already do that Id admire the enter.

Presently when I’ve the map sort to .normal, I can not totally zoom out. The totally zoomed out globe is just obtainable within the fly over sorts, however these sorts present the globe utilizing satellite tv for pc photographs (reveals all terrain). Id like to have the ability to have a normal theme however be capable to zoom out totally. Id admire any assist as I’m not expert with mapkit.

import UIKit
import SwiftUI
import MapKit

struct MapViewSec: UIViewRepresentable {
    func makeUIView(context: Context) -> MKMapView {
        let mapView = MKMapView()
        mapView.mapType = .satellite tv for pc
        mapView.showsScale = true
        mapView.isRotateEnabled = true

        let initialCoordinate = CLLocationCoordinate2D(latitude: 37.7749, longitude: -122.4194)
        let digital camera = MKMapCamera(lookingAtCenter: initialCoordinate, fromEyeCoordinate: initialCoordinate, eyeAltitude: 1000000000000000000)
        mapView.setCamera(digital camera, animated: false)

        return mapView

    func updateUIView(_ uiView: MKMapView, context: Context) {
        // You may implement replace logic right here if wanted


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button