尝试在Swift的代码中添加单引号'字符,但它不断添加一个'',这必然是一个API调用。
我的代码是:
let locationLat = String(format: "%f", (currentLocation?.coordinate.latitude)!)
let locationLong = String(format: "%f", (currentLocation?.coordinate.longitude)!)
let apiLocation = "$filter=geo.distance(Location,geographyPoint" + "(" + locationLat + locationLong + ")) le 0.1"
我需要使apiLocation变量看起来像:
$filter=geo.distance(Location, geography'POINT(lat, long)') le 0.5&searchMode=all&$count=true
让我知道谢谢。