GMSMapView-为什么在街下绘制我的折线?

时间:2019-09-18 16:22:28

标签: ios swift google-maps-sdk-ios gmsmapview

我正在使用GoogleMaps iOS SDK,并已按照说明在地图上添加了折线:

private func addRoute(to mapView: GMSMapView, history: ShipmentHistory) {

    let path = GMSMutablePath()
    path.add(history.currentState.location)
    for alert in history.alerts {
        path.add(alert.location)
    }
    let polyline = GMSPolyline(path: path)
    polyline.strokeWidth = 5
    polyline.strokeColor = UIColor(asset: Asset.ColorAssets.appTint)
    polyline.zIndex = polylineBaseZIndex // value is 20
    polyline.map = mapView

}

现在我想知道为什么它在街道线下绘制这条线,如图所示:

enter image description here

0 个答案:

没有答案