解析GeoPoint Express.js

时间:2015-06-22 16:27:17

标签: javascript node.js express parse-platform

我目前有一个存储用户位置的iOS应用程序。我试图查询这些位置,然后使用Google地图显示它们。现在,我只是试图查询位置以打印它们并确保它们在将它们嵌入地图之前进行了更正,但我一直收到错误,只是显示:

[object Object]

[object Object]

[object Object]
页面加载时

我没有与JS广泛合作,所以我不确定我做错了什么。

控制器:

 var SignoutLocation = Parse.Object.extend('SignoutLocation');

// Display all locaions of signou.
exports.index = function(req, res) {
var query = new Parse.Query(SignoutLocation);
query.limit(10);

query.find().then(function(results) {
  res.render('signoutlocations/index', { signoutlocations: results });
},
function(SignoutLocations) {
  res.send(500, 'Failed loading shit');
});
};

EJS代码:

<!DOCTYPE html>
<html>
  <head>
    <title>THINK Status</title>
    <link rel="stylesheet" type="text/css" href="../../../public/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../../public/css/custom.css">
  </head>
  <body>
    <h1>Location List!</h1>
    <% signoutlocations.forEach(function(signoutlocation) { %>
      <h5><%= signoutlocation.get("Location") %></h5>
      <% }) %>
  </body>
</html>

0 个答案:

没有答案