我是谷歌地图新手,我想向GMSMapView和infoWindow添加多个标记。
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)
var marker = GMSMarker()
marker.position = CLLocationCoordinate2DMake(latDbl,langDbl )
println(marker.position)
marker.flat = true
marker.title = Prop.buildingName as String
marker.snippet = Prop.address as String
marker.infoWindowAnchor = CGPointMake(0.5, 0.5)
marker.map = googleMapView
}
googleMapView.delegate = self
有人可以让我知道我做错了什么或有人可以编辑我的代码并告诉我正确的方法吗?