MapKit, but for SwiftUI

Overview

MapKit-SwiftUI

MapKit, but with SwiftUI!

Examples

Example 1: Simple Map

import MapKitSwiftUI

struct ContentView: View {

    var body: some View {
        AppleMap(lat: 42.336777, long: -71.097242)
            .displayCompass()
            .pointsOfInterest(include: [.school, .cafe, .park])
            .zoomBoundry(500..<2500)
            .ignoresSafeArea()
    }
    
}

Configuring your AppleMap is easy.

Example 2: Markers

let places: [Place] = [
    Place("Coffee! ☕️", lat: 42.33562, long: -71.095651),
    Place("Campus 🫡", lat: 42.336777, long: -71.097242)
]

var body: some View {
    AppleMap(lat: 42.336777, long: -71.097242, annotations: places) {
        Marker(lat: $0.coordinate.latitude, long: $0.coordinate.longitude)
            .title($0.name, subtitle: "Place of interest")
            .color(.systemPurple)
            .glyphImage(systemName: "building.fill")
    }
        .zoomBoundry(500..<2500)
        .boundary(distance: 250)
}

Easily add markers or pins to the map by using the Marker and Pin models

struct Place {

    let name: String
    let lat: Double
    let long: Double
    
    init(_ name, lat: Double, long: Double) {
        self.name = name
        self.lat = lat
        self.long = long
    }
    
}

Place model I used in example 2 and 3

Example 3: Pins

import MapKitSwiftUI

struct ContentView: View {

    let places: [Place] = [
        Place("Coffee! ☕️", lat: 42.33562, long: -71.095651),
        Place("Campus 🫡", lat: 42.336777, long: -71.097242)
    ]

    var body: some View {
        AppleMap(lat: 42.336777, long: -71.097242, annotations: places) {
            Pin(lat: $0.coordinate.latitude, long: $0.coordinate.longitude)
                .title($0.name)
                .color(.systemBlue)
        }
            .zoomBoundry(500..<2500)
            .boundary(distance: 250)
    }
    
}

Pins are very similar to Markers

You might also like...
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

Using CoreLocation and MapKit Together
Using CoreLocation and MapKit Together

Using_CoreLocation_and_MapKit_Together CoreLocation and Mapkit were used togethe

You can touch My Swift, MapKit, UX skills! :D
You can touch My Swift, MapKit, UX skills! :D

What is it? 🙋🏻 It's a pet project which has been developed as a code challenge. It's written purely in Swift without using 3rd party frameworks. Wha

Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework

NAMapKit Lets you drop pins or custom annotations onto a standard UIImage or a tiled NATiledImageView. Includes callouts, multi-colored pins, animatio

Like a SwiftUI ViewBuilder, but for Text
Like a SwiftUI ViewBuilder, but for Text

TextBuilder Introduction Text composition in SwiftUI can often be cumbersome, especially when there's logic affecting its format and content. TextBuil

Your SwiftUI custom slider is crap. Here's mine, which is also crap, but it's my crap

Fuck your custom slider It doesn't work. Sure, it looks great, with gradients, and multiple thumbs, but really, it's useless. No more paying for a sub

EasyMenu - SwiftUI Menu but not only button (similar to the native Menu)
EasyMenu - SwiftUI Menu but not only button (similar to the native Menu)

EasyMenu SwiftUI Menu but not only button (similar to the native Menu) You can c

Cache - Nothing but Cache.
Cache - Nothing but Cache.

Cache doesn't claim to be unique in this area, but it's not another monster library that gives you a god's power. It does nothing but caching, but it does it well. It offers a good public API with out-of-box implementations and great customization possibilities. Cache utilizes Codable in Swift 4 to perform serialization.

Carlos - A simple but flexible cache, written in Swift for iOS 13+ and WatchOS 6 apps.

Carlos A simple but flexible cache, written in Swift for iOS 13+ and WatchOS 6 apps. Breaking Changes Carlos 1.0.0 has been migrated from PiedPiper de

Tranquillity is a lightweight but powerful dependency injection library for swift.
Tranquillity is a lightweight but powerful dependency injection library for swift.

DITranquillity Tranquillity is a lightweight but powerful dependency injection library for swift. The name "Tranquillity" laid the foundation in the b

MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.

MisterFusion MisterFusion makes more easier to use AutoLayout in Swift & Objective-C code. Features Simple And Concise Syntax Use in Swift and Objecti

A compact but full-featured Auto Layout DSL for Swift
A compact but full-featured Auto Layout DSL for Swift

Mortar allows you to create Auto Layout constraints using concise, simple code statements. Use this: view1.m_right |=| view2.m_left - 12.0 Instead of:

🔥 PMSuperButton is a powerful UIButton coming from the countryside, but with super powers! 😎
🔥 PMSuperButton is a powerful UIButton coming from the countryside, but with super powers! 😎

PMSuperButton is a powerful UIButton coming from the countryside, but with super powers! 😎 An easy way to create custom and complex buttons with cust

BrainCore is a simple but fast neural network framework written in Swift.

BrainCore is a simple but fast neural network framework written in Swift. It uses Metal which makes it screamin' fast. If you want to see it

Codable, but with Super power made custom Codable behavior easy.

Codable, but with Super power made custom Codable behavior easy.

A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number. A view that shows selectable symbols, similar to UITableView's `sectionIndexTitles` API but with support for symbols and more flexibility
A view that shows selectable symbols, similar to UITableView's `sectionIndexTitles` API but with support for symbols and more flexibility

📖 TableOfContentsSelector Are you familiar with UITableView's sectionIndexTitles API? The little alphabet on the side of some tables for quickly jump

Example on how to print a NSTableView from your app but then also add text to the print-out.
Example on how to print a NSTableView from your app but then also add text to the print-out.

NSTableView Printing Test This is a demo project so you can check out how printing a table could work. The goal here is to show tabular data on screen

Swift Property Wrappers, but in Objective-C. And done horribly.

TOPropertyAccessor is an open source, Objective-C abstract class. Similar to Realm's Cocoa API, it uses the dynamic nature of the Objective-C runtime to access the properties of any of its subclasses, and routes calling them through overridable access points.

Releases(v1.4.0)
Owner
Lawrence Bensaid
Tech nerd 🤓 working on new things every day & coding passionately 💻
Lawrence Bensaid
Example app using MessagesUI + CoreLocation + MapKit

iOS Example MapKit App Ejemplo de código de una aplicación de mapas usando MessagesUI, MapKit y CoreLocation Built using XCode 13.0 (Swift 5) ¿Cómo ej

Manu Martinez 0 Oct 19, 2021
JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap.

JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap. Installation Cocoapods pod 'JDSWiftHeatMap' Usage JDSwi

郭介騵 135 Dec 26, 2022
An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.

ClusterKit is an elegant and efficiant clustering controller for maps. Its flexible architecture make it very customizable, you can use your own algor

null 502 Dec 25, 2022
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework

NAMapKit Lets you drop pins or custom annotations onto a standard UIImage or a tiled NATiledImageView. Includes callouts, multi-colored pins, animatio

Neil Ang 263 Jun 29, 2022
Demo in SwiftUI of Apple Map, Google Map, and Mapbox map

SNMapServices SNMapServices is a serices for iOS written in SwiftUI. It provides Map capability by subclassing Mapbox, Google map and Apple map. This

Softnoesis 3 Dec 16, 2022
MKMapView wrapper for SwiftUI as drop-in to MapKit's SwiftUI view

MKMapView wrapper for SwiftUI as drop-in to MapKit's SwiftUI view. Easily extensible annotations and overlays, iOS 13 support and backwards compatible with MKAnnotation and MKOverlay!

Paul 73 Dec 26, 2022
SwiftUI app with MapKit

InterestingPlaces app that contains information about unusual places in the world.

Ihor Muliar 3 May 23, 2022
SwiftUI wrapper for MapKit's MKMapView (UIKit).

SwiftUIMKMapView SwiftUI wrapper for MapKit's MKMapView (UIKit). ▶️ Usage Add as a dependecy to your project using Swift Package Manager. Embed map vi

Dariusz Rybicki 1 Apr 4, 2022
Example app using MessagesUI + CoreLocation + MapKit

iOS Example MapKit App Ejemplo de código de una aplicación de mapas usando MessagesUI, MapKit y CoreLocation Built using XCode 13.0 (Swift 5) ¿Cómo ej

Manu Martinez 0 Oct 19, 2021
JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap.

JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap. Installation Cocoapods pod 'JDSWiftHeatMap' Usage JDSwi

郭介騵 135 Dec 26, 2022