如何在 swift 中创建 SKViaPoint 数组 - Skobbler API
How to create an array of SKViaPoint in swift - Skobbler API
我想用多个 viaPoints 计算一条路线。
let route = SKRouteSettings()
route.startCoordinate = self.userLocation
route.destinationCoordinate = endCheckpoint.location.coordinate
route.viaPoints = viaPointsArray
SKRoutingService.sharedInstance().calculateRoute(route)
但是我不能申报SKViaPoint。 Class 声明似乎丢失了,因为我得到 "Use of unresolved identifier 'SKViaPoint' when I try to declare a variable"
有什么我想念的吗?
我记得当我在 Objective C 工作时,我需要导入 SKViaPoint.h 具体 this is the old question about it
那么在swift我应该做什么呢?
Swift 实现缺少一些导入(SKViaPoint 是其中之一)。
请参阅 this 个问题以解决问题
我想用多个 viaPoints 计算一条路线。
let route = SKRouteSettings()
route.startCoordinate = self.userLocation
route.destinationCoordinate = endCheckpoint.location.coordinate
route.viaPoints = viaPointsArray
SKRoutingService.sharedInstance().calculateRoute(route)
但是我不能申报SKViaPoint。 Class 声明似乎丢失了,因为我得到 "Use of unresolved identifier 'SKViaPoint' when I try to declare a variable"
有什么我想念的吗? 我记得当我在 Objective C 工作时,我需要导入 SKViaPoint.h 具体 this is the old question about it
那么在swift我应该做什么呢?
Swift 实现缺少一些导入(SKViaPoint 是其中之一)。
请参阅 this 个问题以解决问题