【发布时间】:2017-09-08 01:48:52
【问题描述】:
我正在尝试根据我找到的代码here - third answer 创建一个带点的Polyline。我想出了这个:
// route
let path = GMSMutablePath()
// populate path with coordinates here
// ...
let route = GMSPolyline(path: path)
route.strokeWidth = 3.0
let styles = [GMSStrokeStyle.solidColor(UIColor(red: 0.945, green: 0.392, blue: 0.278, alpha: 1.0)), GMSStrokeStyle.solidColor(UIColor.clearColor())]
let lengths = [10,10]
route.spans = GMSStyleSpans(route.path!, styles, lengths, kGMSLengthRhumb);
route.map = m_map_view
我得到一个unresolved identifier 错误,因为kGMSLengthRhumb 在我的系统中未被识别为某个有效常量。我正在使用 Swift 2.0。
kGMSLengthRhumb 在哪里,或者我应该放什么?
【问题讨论】:
标签: ios swift xcode google-maps