parse-php-sdk geoPoint withinPolygon异常

问题描述 投票:0回答:1

我正试图在邻近的美国境内的MongoDB中找到位置。为此,我使用查询“withinPolygon”和美国周围的矩形。不完全,但应该工作:)我得到的反应是'坏约束:$ geoWithin'(代码107)

好奇,如果其他人使用“withinPolygon”查询,如果有什么我做错了?

这是基本代码:

$query = new Parse\ParseQuery( "Church" );
$nwCornerContiguous = new Parse\ParseGeoPoint( $top, $left );
$neCornerContiguous = new Parse\ParseGeoPoint( $top, $right );
$swCornerContiguous = new Parse\ParseGeoPoint( $bottom, $left );
$seCornerContiguous = new Parse\ParseGeoPoint( $bottom, $right );
$query->withinPolygon( "locationGeopoint",
array( $nwCornerContiguous, $neCornerContiguous, $swCornerContiguous, 
$seCornerContiguous ) );
$results = $query->find();
  • PHP版本:5.5.38
  • 解析PHP SDK版本:1.4
  • 解析服务器版本:2.3.3-2
php parse-platform geopoints
1个回答
0
投票

“ofPolygon”功能已添加到Parse Server版本2.5中

© www.soinside.com 2019 - 2024. All rights reserved.