$cont = new \Think\Model\MongoModel("house_general");
$param = array('base_point'=>array('$geoWithin'=>array('$polygon'=>-45.917165194462875,170.4756662249565,-45.917161462449876,170.4756662249565,-45.91711667827437,170.47570377588272,-45.91709055415529,170.4757735133171,-45.91708309011901,170.4759880900383,-45.91708309011901,170.4760578274727)));
$result=$cont->where($param)->limit(10)->field(array("address"=>true,"_id"=>true,"base_point"=>true))->select();我是这么写的报错: 127.0.0.1:27017: Malformed geo query: { $geoWithin: { $polygon: "-45.917064430023906,170.47556966543198,-45.91700471767744,170.4758432507515,-45.91698978958078,170.47599345445633,-45.91698605755599,170.4762348532676..." } }错误位置
FILE: /phpstudy/www/Tiger/ThinkPHP/Library/Think/Db/Driver/Mongo.class.php LINE: 418
求助!!!
最佳答案