我正在像这样在Redis服务器中添加旅行的纬度和经度
redisClient.geoadd(tripId, [result.start_lat, result.start_long, "startLocation"], function (err, result) {
console.log(err, result);
});
我想针对startLocation键获取这些经度和纬度。我该如何实现?
答案 0 :(得分:1)
您应该为此调用GEOPOS
命令。
redisClient.geopos(tripId, "startLocation"], function (err, result) { console.log(err, result); });