1
我一直在使用sails.js的项目,将显示用户位置附近的帖子,但是虽然我没有找到引用和工具来地址解析我找不到地址有关通过距离另一组坐标来找到这些信息的任何信息,这是您使用常规mongodb的方式。我的地方模式是:Sails.js通过距离地理位置坐标找到
module.exports = {
attributes: {
longitude: {
type: 'float',
required: true
},
latitude: {
type: 'float'
},
country: {
type: 'string'
},
city: {
type: 'string'
},
stateCode: {
type: 'string'
},
zipcode: {
type: 'string'
},
streetName: {
type: 'string'
},
streetNumber: {
type: 'string'
}
}
};
我将如何组成这一模式的发现,以查找和排序由一组范围内的距离?