{"id":23458158,"url":"https://github.com/lawrencebensaid/mapkit-swiftui","last_synced_at":"2026-04-30T09:36:02.026Z","repository":{"id":42390574,"uuid":"477944066","full_name":"lawrencebensaid/MapKit-SwiftUI","owner":"lawrencebensaid","description":"MapKit, but for SwiftUI!","archived":false,"fork":false,"pushed_at":"2022-04-07T12:05:51.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T18:09:32.388Z","etag":null,"topics":["directions","mapkit","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lawrencebensaid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-05T02:13:19.000Z","updated_at":"2022-07-01T15:16:48.000Z","dependencies_parsed_at":"2022-08-27T13:12:45.379Z","dependency_job_id":null,"html_url":"https://github.com/lawrencebensaid/MapKit-SwiftUI","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lawrencebensaid/MapKit-SwiftUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrencebensaid%2FMapKit-SwiftUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrencebensaid%2FMapKit-SwiftUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrencebensaid%2FMapKit-SwiftUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrencebensaid%2FMapKit-SwiftUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lawrencebensaid","download_url":"https://codeload.github.com/lawrencebensaid/MapKit-SwiftUI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawrencebensaid%2FMapKit-SwiftUI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directions","mapkit","swift","swiftui"],"created_at":"2024-12-24T05:16:39.542Z","updated_at":"2026-04-30T09:36:02.012Z","avatar_url":"https://github.com/lawrencebensaid.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MapKit-SwiftUI\n\nMapKit, but with SwiftUI!\n\n## Examples\n\n**Example 1: Simple Map**\n\n```swift\nimport MapKitSwiftUI\n\nstruct ContentView: View {\n\n    var body: some View {\n        AppleMap(lat: 42.336777, long: -71.097242)\n            .displayCompass()\n            .pointsOfInterest(include: [.school, .cafe, .park])\n            .zoomBoundry(500..\u003c2500)\n            .ignoresSafeArea()\n    }\n    \n}\n```\n\nConfiguring your AppleMap is easy.\n\n**Example 2: Markers**\n\n```swift\nlet places: [Place] = [\n    Place(\"Coffee! ☕️\", lat: 42.33562, long: -71.095651),\n    Place(\"Campus 🫡\", lat: 42.336777, long: -71.097242)\n]\n\nvar body: some View {\n    AppleMap(lat: 42.336777, long: -71.097242, annotations: places) {\n        Marker(lat: $0.coordinate.latitude, long: $0.coordinate.longitude)\n            .title($0.name, subtitle: \"Place of interest\")\n            .color(.systemPurple)\n            .glyphImage(systemName: \"building.fill\")\n    }\n        .zoomBoundry(500..\u003c2500)\n        .boundary(distance: 250)\n}\n```\n\nEasily add markers or pins to the map by using the `Marker` and `Pin` models\n\n```swift\nstruct Place {\n\n    let name: String\n    let lat: Double\n    let long: Double\n    \n    init(_ name, lat: Double, long: Double) {\n        self.name = name\n        self.lat = lat\n        self.long = long\n    }\n    \n}\n```\n\n*Place model I used in example 2 and 3*\n\n**Example 3: Pins**\n\n```swift\nimport MapKitSwiftUI\n\nstruct ContentView: View {\n\n    let places: [Place] = [\n        Place(\"Coffee! ☕️\", lat: 42.33562, long: -71.095651),\n        Place(\"Campus 🫡\", lat: 42.336777, long: -71.097242)\n    ]\n\n    var body: some View {\n        AppleMap(lat: 42.336777, long: -71.097242, annotations: places) {\n            Pin(lat: $0.coordinate.latitude, long: $0.coordinate.longitude)\n                .title($0.name)\n                .color(.systemBlue)\n        }\n            .zoomBoundry(500..\u003c2500)\n            .boundary(distance: 250)\n    }\n    \n}\n```\n\nPins are very similar to Markers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawrencebensaid%2Fmapkit-swiftui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawrencebensaid%2Fmapkit-swiftui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawrencebensaid%2Fmapkit-swiftui/lists"}