GMSMarker icon转换标记时的奇怪行为

时间:2017-10-04 12:24:04

标签: ios swift google-maps marker

我目前正在iOS应用程序中使用谷歌地图,当我点击标记时,我使用iconView作为标记,并缩放当前所选标记,其他标记看起来很奇怪。

func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool
{
    if marker.userData != nil
    {
        let index : Int = Int(marker.userData as! String)!

        //small all the marker
        _ = markers.map { (marker) in
            marker.iconView?.transform = CGAffineTransform.identity
        }

        markers[index].iconView?.transform = CGAffineTransform(scaleX: 1.5, y: 1.5)
        setVenuePin(index: index)
    }

    return false
}

0 个答案:

没有答案
相关问题