Skip to content

Repository files navigation

ImmersiveMap

CI Swift Versions Platforms Release License

ImmersiveMap is a pure Swift + Metal map rendering engine for SwiftUI apps on Apple platforms.

Manhattan with 3D buildings and shadows The Chicago Loop under a tilted camera

Berlin Mitte in the dark palette Berlin Mitte from a tilted camera

Avatar markers with badges over Shibuya A 3D scene model by the Eiffel Tower

The globe with the atmosphere and stars Avatar markers on the globe

San Francisco coastline with labels The Alps around Zermatt with land cover and peak names

Features

Built-in Protomaps vector tiles, native iOS (UIKit host), native macOS, SwiftUI integration, map styling and colors, SwiftUI markers, avatars, 3D scene models, landmark models that replace the map's buildings, tour video export.

Map Data

The map draws the Protomaps basemap, an OpenStreetMap planet in a single PMTiles archive that the engine reads with HTTP range requests, with no tile server in between. The archive hosted for this project is the default, and .tileArchive(_:headers:) points the map at any Protomaps planet build or a region cut from one.

Quick Start

import SwiftUI
import ImmersiveMap

struct ContentView: View {
    @State private var camera = ImmersiveMapCameraController()

    var body: some View {
        ImmersiveMapView()
            .cameraController(camera)
            .enableCameraUIControls()
            .ignoresSafeArea()
    }
}

Installation

Add ImmersiveMap as a Swift Package dependency:

https://github.com/artembobkin/ImmersiveMap.git

Requirements

  • Swift 6.0+
  • Xcode 16+
  • iOS 18+
  • macOS 15+
  • Metal-capable device or simulator

Attribution

"© OpenStreetMap" is required if you use the built-in tiles, which are OpenStreetMap data. Otherwise the license is MIT and nothing here changes that. It would just be cool if you mention ImmersiveMap somewhere:

Maps powered by ImmersiveMap (immersivemap.dev)

Contributing

ImmersiveMap is currently maintained as a single-maintainer project. Issues and feedback are welcome. Pull requests are accepted. For bug reports, feature requests, questions and ideas, open an issue.

License

ImmersiveMap is available under the MIT license. See LICENSE. The internal earcut triangulator is a port of ISC-licensed Mapbox code, and its notice heads EarcutCore.swift.

Commercial Support

I am available for consulting and custom ImmersiveMap integrations. To get in touch, open an issue.

About

Native Swift 6 + Metal map rendering engine for SwiftUI. Globe and flat vector-tile maps with labels, SwiftUI markers and avatars, on iOS and macOS.

Topics

Resources

Stars

94 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages