Call DispatchQueue.main.async inside a for loop or Call the for loop inside the DispatchQueue.main.async?

Hello this question might sound a bit confusing but I am trying to understand which one is better.
Aim – load 50 coordinates from my database api and then make google marker for each of them and add them to google map view.
I have two approaches here.

One is receiving all the coordinates and appending them to an array inside a loop and when all the coordinates are added, update the view.

DispatchQueue.main.async(){

for item in myitems {
let position = CLLocationCoordinate2D(latitude: lat as!    CLLocationDegrees, longitude: long as! CLLocationDegrees)
                            let marker = GMSMarker(position: position)
                            marker.title = name as! String
                            marker.map = self.mapView
}

}

Other approach is update the view inside the loop.

if let lat = item["latitude"], let long = item["longitude"], let name = item["shopName"] {
                        DispatchQueue.main.async{
                            let position = CLLocationCoordinate2D(latitude: lat as! CLLocationDegrees, longitude: long as! CLLocationDegrees)
                            let marker = GMSMarker(position: position)
                            marker.title = name as! String
                            marker.map = self.mapView
                        }

                    }