Where do I retrieve the photo_reference value to make a Google Places Photos request?

て烟熏妆下的殇ゞ 提交于 2019-12-02 07:16:20

The google.maps.places.PlacePhoto object provides the method getUrl() that returns URL of the place photo. Use this method to get the URL of image, Maps JavaScript API doesn't expose a photo reference.

Have a look at documentation for further details:

https://developers.google.com/maps/documentation/javascript/reference#PlacePhoto

place.photos.forEach(function (placePhoto) {
    var url = placePhoto.getUrl({
        maxWidth: 600,
        maxHeight: 400
    });
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!