Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 解析-Within英里和Within公里不工作?_Swift_Parse Platform_Geopoints - Fatal编程技术网

Swift 解析-Within英里和Within公里不工作?

Swift 解析-Within英里和Within公里不工作?,swift,parse-platform,geopoints,Swift,Parse Platform,Geopoints,我在构建或运行我的应用程序方面没有任何问题。 我存储在一个地理点上,并与运行中创建的另一个进行比较 我给它们分配了相同的值(我已经尝试分配了不同的位置,通过更改纬度和经度上的数字) 它们之间的距离是0米或1米 这不起作用: query.whereKey("Coordinate", nearGeoPoint: currentLocation, withinKilometers: 15.0) query.whereKey("Coordinate", nearGeoPoint: currentLoc

我在构建或运行我的应用程序方面没有任何问题。 我存储在一个地理点上,并与运行中创建的另一个进行比较

我给它们分配了相同的值(我已经尝试分配了不同的位置,通过更改纬度和经度上的数字)

它们之间的距离是0米或1米

这不起作用:

query.whereKey("Coordinate", nearGeoPoint: currentLocation, withinKilometers: 15.0)
query.whereKey("Coordinate", nearGeoPoint: currentLocation, withinKilometers: 155555555.0)
这项工作:

query.whereKey("Coordinate", nearGeoPoint: currentLocation)
但这不起作用:

query.whereKey("Coordinate", nearGeoPoint: currentLocation, withinKilometers: 15.0)
query.whereKey("Coordinate", nearGeoPoint: currentLocation, withinKilometers: 155555555.0)

这对我来说毫无意义。

当前位置实际上是什么样子?“不起作用”是什么意思?实际结果与预期结果相比如何?当我说“不工作”时,意味着它不会返回距离当前位置1米远的位置。它仅在我不使用WithInkilometers时返回CurrentLocation是PFGeoppoint,并且在我打印它时返回:“