模板助手中的流星异常

时间:2015-10-10 08:09:12

标签: javascript meteor geojson

我在我的应用程序中遇到问题,我在这一行上收到错误

<pre><code>type: 'Point'</code></pre>

错误:

Exception in template helper

Locs中的结构是 GeoJSON 结构。

这是客户端的代码:     

nextlocation: function(){
      var geodata = Geolocation.latLng();
      var nextloc = Locs.find({
        location: {
          $near: {
            $geometry: {
                type: 'Point',
                coordinates: [geodata.lng,geodata.lat]
            },
            $maxDistance: 100000
          }
        }
      });
      console.log(nextloc);
      return nextloc;
    }

模板中的代码:     

{{nextlocation._id}}

我不知道为什么会出现错误。

0 个答案:

没有答案
相关问题