我正在尝试将一个项目添加到包含 Geolocation 字段的列表中,我在文档中找不到如何向该字段添加值,我尝试了多种方法,但均未成功:
await web.lists.getByTitle('Opiniones')
.items.add({
...
Location: { "__metadata": {"type": "SP.FieldGeolocationValue"}, Latitude: parseInt(req.body.lat||0), Longitude: parseInt(req.body.long||0)
...
}
或者这样:
await web.lists.getByTitle('Opiniones')
.items.add({
...
Location: { Latitude: parseInt(req.body.lat||0), Longitude: parseInt(req.body.long||0)
...
}