我在我的应用程序中遇到问题,我在这一行上收到错误
<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}}
我不知道为什么会出现错误。