I\'m using Google Places API
to retrieve data about places, but couldn\'t find how to get a picture of that place, Google Places API
just provides
First get the photo_reference from the response:
var photoRef;
if (data.results[i].photos && Array.isArray(data.results[i].photos)) {
photoRef = data.results[i].photos[0].photo_reference;
}
Use the Google Photos API endpoint to GET the place photo/picture:
https://maps.googleapis.com/maps/api/place/photo?maxwidth=960&photoreference="+ photoRef +"&key=AIzaSyBp0cy7ti0z5MJMAwWiPMNvbJobmWYGyv4' alt=''/>