MKPolyline boundingMapRect插入

时间:2018-12-15 20:26:12

标签: ios swift mapkit

如何在 flutter: assets: - icons/heart.png 的{​​{1}}中添加插图以与boundingMapRect一起使用?

MKPolyline

1 个答案:

答案 0 :(得分:0)

您可以像这样向该区域添加跨度:

// This will add a 10% increase in the span.
var region = MKCoordinateRegion(polyLine.boundingMapRect)
region.span.latitudeDelta = 1.1
region.span.longitudeDelta = 1.1

编辑:

这也是一种选择:

let region = polyLine.boundingMapRect
map.setVisibleMapRect(region, edgePadding: UIEdgeInsets(top: 50.0, left: 50.0, bottom: 50.0, right: 50.0), animated: true)