We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
查询坐标的时候报错
in Builder.php line 202 at Error::appError(8, 'Undefined offset: 1', 'D:\xxx\xxx\simple...', 202, ['field' => 'coordinates', 'val' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]], 'key' => 'coordinates']) in Builder.php line 202 at Builder->parseWhereItem('coordinates', ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]) in Builder.php line 173 at Builder->parseWhere(['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], ['projection' => ['_id' => 1, 'coordinates' => 1], 'where' => ['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], 'table' => 'SignPlace', ...]) in Builder.php line 440 at Builder->count(['projection' => ['_id' => 1, 'coordinates' => 1], 'where' => ['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], 'table' => 'SignPlace', ...], null) in Query.php line 450
比如下面的查询条件: `Array ( [coordinates] => Array ( [$near] => Array ( [$geometry] => Array ( [type] => Point [coordinates] => Array ( [0] => 114.413696 [1] => 30.492449 ) ) [$maxDistance] => 200 )
) )`
是这一行报错: list($exp, $value) = $val; $val传过来是个多维数组,这应该是个bug吧,像这种地理坐标的查询一般就是多维数组啊!
请问下这咋解决呢?
The text was updated successfully, but these errors were encountered:
修复“未定义数组下标: 1”
f3754e7
See issue 90 top-think#90
参考我的修改https://github.com/top-think/think-mongo/pull/91, 不知道能否对你有所帮助
Sorry, something went wrong.
f3cac5f
See issue 90 #90
No branches or pull requests
查询坐标的时候报错
in Builder.php line 202 at Error::appError(8, 'Undefined offset: 1', 'D:\xxx\xxx\simple...', 202, ['field' => 'coordinates', 'val' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]], 'key' => 'coordinates']) in Builder.php line 202 at Builder->parseWhereItem('coordinates', ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]) in Builder.php line 173 at Builder->parseWhere(['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], ['projection' => ['_id' => 1, 'coordinates' => 1], 'where' => ['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], 'table' => 'SignPlace', ...]) in Builder.php line 440 at Builder->count(['projection' => ['_id' => 1, 'coordinates' => 1], 'where' => ['$and' => ['coordinates' => ['$near' => ['$geometry' => ['type' => 'Point', 'coordinates' => [114.413696, 30.492449]], '$maxDistance' => 200]]]], 'table' => 'SignPlace', ...], null) in Query.php line 450
比如下面的查询条件:
`Array
(
[coordinates] => Array
(
[$near] => Array
(
[$geometry] => Array
(
[type] => Point
[coordinates] => Array
(
[0] => 114.413696
[1] => 30.492449
)
)
[$maxDistance] => 200
)
是这一行报错:
list($exp, $value) = $val;
$val传过来是个多维数组,这应该是个bug吧,像这种地理坐标的查询一般就是多维数组啊!
请问下这咋解决呢?
The text was updated successfully, but these errors were encountered: