AMAZING NEW SwiftUI MapKit Features | iOS 17 | WWDC23

preview_player
Показать описание
In this video we will cover all the awesome new updates to the MapKit API with SwiftUI, released at WWDC23!

* This is done in Xcode 15 Beta *

🔴 Become a member for lifetime access to source code:

🖥️ COURSES & SOURCE CODE FILES

👉 Pro Courses:

👉 iOS App Templates:

👉 FREE UBER SwiftUI Course

👉 FREE Crypto SwiftUI Course

👉 FREE Twitter SwiftUI Course

🔴 Chapters
0:00 - Intro
0:26 - Project demo
2:05 - Project Setup
2:21 - MapView Setup
4:07 - Adding annotations to map
6:49 - Map Controls
8:34 - Search and display locations
13:59 - Selecting annotations
15:46 - Location Details View
21:00 - Look around preview
24:22 - Open in maps
26:51 - Get directions
32:39 - Outro
Рекомендации по теме
Комментарии
Автор

in the thumbnail are shown waypoints or stops between the starting and ending point, any help on that? I'd appreciate it.

yoelcera
Автор

Very NIce
Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want, like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day.

reddisekhar
Автор

when puting Marker ("My location, cordinate: .usrlocation) i get this error " buildExpression' is unavailable: this expression does not conform to 'View' I went to product and test plan and made sure location is enable to a set one but not sure how to go around this

jessicaperez
Автор

The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

how can ı solve this

cagataykalkann
Автор

Great work here. One comment.

If you change the fetchLookAroundPreview to be an async function like this:
func fetchLookAroundPreview() async {
if let mapSelection {
lookaroundScene = nil
let request = mapSelection)
lookaroundScene = try? await request.scene
}
}

you can remove the Task unit of work and then replace both onAppear and the onChange for mapSelection to this:
.task(id: mapSelection) {
await fetchLookAroundPreview()
}

StewartLynch
Автор

I have a tabview at the bottom of my app at all times. How do I get a sheet to come up from the bottom without covering it

malikbrahimi
Автор

Hello, nice tutorial, one more question, to make your app user friendly: if i want to add a "clean" button on top of the map that will erase all my previous search results, so that i can start a new search : putting
route = nil

searchText = ""
results.removeAll()
showDetails = false
getDirections = false
cameraPosition = .region(.myRegion)
mapSelection = nil

does not seem to be sufficient
did i miss something ? because any new search using textfield overaly, does not provide any new result !!

thank you so much by advance if you can tell us a bit more about this issue

vincent-ukij
Автор

Hope they build a decent camera view and recording view soon

dotnetdevni
Автор

Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want, like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day.


I have been avoiding using beta xcode because I didn't want compatibility issues with my older devices, I also have older watch and tablet, but my rng runner app has been on the back burner forever because of the hassle, but this, this makes it so easy, so do I have to wait for xcode to not be beta or can I go ahead and use beta to make the app and it will run just fine on iOS 16?

jmartin
Автор

Can you please make a video on how to introduce geofence or shape/polygons perhaps for zipcodes on an iOS map app?

redone
Автор

Before the iOS 17 update I used annotationitems to append annotations from an array, which gave me a lot of other issues. Any idea how to add interactable annotations with new update?

Really close to just going back to Old School Swift 🤣

BenzenBaws
Автор

Ok, what if I don’t live in Miami? How do I actually use the users position instead of using a set position?

andr_line
Автор

Amazing video! Thanks for all this work. How would you go about updating the camera pitch as well? I also wanted to ask how to update the camera but not to display the whole polyline but to put it like behind the user just like google maps. Thanks again!

hanspreinfalk
Автор

Wow appreciate it that thanks so much .

natgenesis
Автор

That part about the .rect(rect) not being zoomed out far enough is intentional. They did that so you can do things like offset without having to do a bunch of conversions from Coords to View Frames. Having it directly as a rect means you can add padding.

xTwisteDx
Автор

hello its my error: Cannot find type 'MapCameraPosition' in scope
please help me

Sechallenge
Автор

Unfortunately, this code no longer works (as of February 26, 2024). Despite being a well-produced video, its non-functionality can be confusing. (Code stops working at 26 minutes and 52 seconds in the Video)

breezefpv
Автор

bro dont wanna complain but we really have to type all this out lmfaooo

kayboy
Автор

I can't read your screen. Too far away.

courtneyjackson
Автор

let a = MKMapView().mapRectThatFits(rect, edgePadding: .init(top: 42, left: 42, bottom: 500, right: 42)) this is not working with iOS 17. Any idea ?

pardipbhatti
welcome to shbcf.ru