let locations = [
["title": "Phase 11, Mohali", "latitude": 30.680177, "longitude": 76.745705],
["title": "Phase 6, Mohali", "latitude": 30.735547, "longitude": 76.712071],
["title": "Phase 106, Mohali", "latitude": 30.728100, "longitude": 76.717665]
]
for location in locations {
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: location["latitude"] as! Double, longitude: location["longitude"] as! Double)
// state_marker2.snippet = "Phase 106, Mohali."
marker.title = location["title"] as? String
//For image
// let markerImage = UIImage(named: "Web")!.withRenderingMode(.alwaysTemplate)
// let markerView = UIImageView(image: markerImage)
// marker.iconView = markerView
marker.map = gmsMapViewOut
}
Comments
Post a Comment