gpt4 book ai didi

ios - 特定缩放取决于注释

转载 作者:行者123 更新时间:2023-11-29 01:54:53 27 4
gpt4 key购买 nike

我正在编写 Swift 应用程序,并使用 SDK Skobbler。我想知道是否可以根据注释指示特定的缩放。我想要一个准确的变焦...我知道路由服务有自动缩放的功能:

routingService.zoomToRouteWithInsets(UIEdgeInsetsZero)

这是应用截图:

enter image description here

最佳答案

试试下面的代码

let boundingBox = SKBoundingBox(topLeftCoordinate: CLLocationCoordinate2DMake(track.ne.coordinate.latitude, track.sw.coordinate.longitude), bottomRightCoordinate: CLLocationCoordinate2DMake(track.sw.coordinate.latitude, track.ne.coordinate.longitude))

// Add the mapView to the view just to see if it displays correctly. (It does!)
mapView.fitBounds(boundingBox, withPadding: CGSizeMake(20, 20))

关于ios - 特定缩放取决于注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30979979/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com