在 Baqend 中保存纬度和经度的正确语法是什么?
我成功保存了普通字段(它们都是字符串):
handleSubmit(event) {
event.preventDefault();
var newcompany = new db.Companies({
name: this.state.name,
photo: '',
geo: '47.626814;-122.357345',
address1: this.state.address1,
address2: this.state.address2,
city: this.state.city,
state: this.state.state,
zip: this.state.zip,
});
newcompany.insert().then(() => {
//console.log(newcompany)
this.setState({
redirect: true,
newcompanykey: newcompany.key
})
})
}
但我似乎无法正确保存地理信息。可能是因为我将它视为一个字符串,这是不正确的?
在示例代码中,我现在只是将其硬编码为我知道好的值,因此我们可以让它工作。