'Make URL string not auto search when Apple Maps is opening threw my app

I have a function inside my button to open up Apple Maps and search for Kebab. However when Apple Maps is opening, Apple Maps have already chosen a Kebab restaurant, not showing the list with nearby restaurants as if you would search for it manually.

Ideas to fix this? Get the list and not an executed search?

Button{

let url = URL(string:"maps://?saddr=&daddr=\("Kebab")")
                    
                    if UIApplication.shared.canOpenURL(url!){
                        UIApplication.shared.open(url!, options: [:], completionHandler: nil)}

     } label: {

Text("Find Kebab")

}





Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source