1

我正在使用一个机器人平台,我必须提供一个图像 URL 来显示图像。

Google Places Photo Response 是图片而不是 URL。有什么方法可以检索 URL?

我正在使用 NodeJs 请求

var options = { method: 'GET',
  url: 'https://maps.googleapis.com/maps/api/place/photo',
  qs: 
  { maxwidth: '400',
    photoreference: photoreference,
    key: Google_Places_KEY },
  };

request(options, function (error, response, body) {
 // Code goes here. 
 });

我现在的解决方案是将照片上传到我的服务器,创建一个 URL 并提供它。有更好的解决方法吗?

4

0 回答 0