Swift, Add multiple markers on GMSMapView

I am new to Google map and i want to add multiple markers to GMSMapView and infoWindow.



My code below

---------------





for Prop: Property in properties

{

var latStr = Prop.lat as NSString

var latDbl : Double = Double(latStr.intValue)

var langStr = Prop.lang as NSString

var langDbl : Double = Double(langStr.intValue)

position = CLLocationCoordinate2DMake(latDbl, langDbl)

london = GMSMarker(position: position)

london.flat = true

london.map = googleMapView

}



Can some one please let me know..What i am doing wronge or someone can edit my code and show me the correct way?



Thanks in advance for the help!

Replies

This code works for me:


var London= GMSMarker()

London.position = CLLocationCoordinate2DMake(lat, lang)

London.title = "...."

London.snippet = "....."

London.map = googleMapView


var London1= GMSMarker()

London1.position = CLLocationCoordinate2DMake(lat, lang)

London1.title = "...."

London1.snippet = "....."

London1.map = googleMapView


Hope you can use it

Post not yet marked as solved Up vote reply of AB84 Down vote reply of AB84