【发布时间】:2020-11-25 13:25:26
【问题描述】:
我正在尝试创建带有经纬度的苹果地图地址链接
我试过这样:
let addrLoction = addressModel[indexPath.row]
let coord = addrLo.location
latitude = coord?.latitude
longitude = coord?.longitude
let mapAddr = "http://maps.apple.com/?q={latitude},{longitude}"
出现错误:
运算符后的预期表达式
例如:像android app goole maps地址链接,我需要apple map地址链接
【问题讨论】:
-
你在哪几行得到错误?
-
@sp4c38 这里
let mapAddr = "http://maps.apple.com/?q={latitude},{longitude}" -
将最后一行更改为
let mapAddr = "http://maps.apple.com/?q=\(latitude),\(longitude)"有帮助吗?
标签: swift apple-maps