2015-11-20 26 views
-1

我用我的查詢通過給出xy座標來查找集合。但沒有結果被提取。我添加了我的數據庫的圖像。我只需要返回與該座標對應的屬性文檔。 database如何使用geojson數據庫的「查找」查詢

db.getCollection('line').find(
    {"features" : 
    [ 
    { 
     "properties" : { 
     , 
     "geometry" : { 
      "type" : "Point", 
      "coordinates" : [ 
       79.8658999999999960, 
       6.8513479999999998 
    ] 
    } 
    ) 

回答

0

嘗試使用這樣的:

db.getCollection('user').find(
{"features" : 

    { 
    "properties" : { 

      "geometry" : { 
     "type" : "Point", 
     "coordinates" : [ 
      79.8658999999999960, 
      6.8513479999999998]}}}}) 
+0

沒有。它不工作。我添加了數據庫的圖像。我只需要獲取與該座標對應的屬性文件。 –