简体   繁体   English

从 Arrow DB 中的坐标查找数据

[英]Find data from coordinates in Arrow DB

After reading docs https://docs.appcelerator.com/arrowdb/latest/#!/guide/customfields I coud not find any way to get data from coordinates with arrow DB projet (when you deploy it in the cloud !).阅读文档https://docs.appcelerator.com/arrowdb/latest/#!/guide/customfields 后,我找不到任何方法从带有箭头 DB 项目的坐标获取数据(当您将其部署在云中时!)。

I try this :我试试这个:

req.model.query({
    coordinates: {
        "$nearSphere": [50.8331170,4.3846790], // test values
        "$maxDistance": 0.1
    }
}, next);

My model look like this :我的模型看起来像这样:

var Arrow = require('arrow');

var Model = Arrow.createModel('test', {
    fields: {
        coordinates: {
            type: Array
        },
        name: {
            type: String
        },
        description: {
            type: String
        }
    },
    connector: 'appc.arrowdb',
    autogen: false
});

module.exports = Model;

To be clear I want to find some data around a "location"明确地说,我想在“位置”周围找到一些数据
Someone have an idea for that ?有人对此有想法吗?

您可以使用 $geonear,它在https://docs.appcelerator.com/arrowdb/latest/#!/guide/search_query 中提到,搜索近球

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM