0

I am new at using Google Api 'I manage to retrieve businesss from google place but the only photos I could get are photos uploaded by customers Is there a way to retrieve the official photo/Logo of the business? thanks

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
jerem
  • 1,016
  • 2
  • 12
  • 27

1 Answers1

0

You can use place ID that uniquely identifies a place and can be used to retrieve information about the place. It looks like ChIJrTLr-GyuEmsRBfy61i59si0.

Place IDs are available for most locations, including businesses, landmarks, parks, and intersections. These IDs are stable, meaning that once you've identified the place ID for a place, you can reuse that value when you next look up that place.

When the Places service returns results from a details request, it places them within a single result. Each result within the results array may contain the photos[] field:

"photos" : [
            {
               "height" : 242,
               "html_attributions" : [],
               "photo_reference" : "CnRnAAAABjeoPQ7NUU3pDitV4Vs0BgP1FLhf_iCgStUZUr4ZuNqQnc5k43jbvjKC2hTGM8SrmdJYyOyxRO3D2yutoJwVC4Vp_dzckkjG35L6LfMm5sjrOr6uyOtr2PNCp1xQylx6vhdcpW8yZjBZCvVsjNajLBIQ-z4ttAMIc8EjEZV7LsoFgRoU6OrqxvKCnkJGb9F16W57iIV4LuM",
               "width" : 200
            }

Check this SO question and documentation for more details.

Community
  • 1
  • 1
abielita
  • 13,147
  • 2
  • 17
  • 59
  • I did get the photo array, my problem is that in this array all the photos are photos taken by customers and uploaded (its could be a photo of a meal) but I want to display a list of business with their "official" photo or logo and I didnt find that in the google object or docs – jerem Apr 19 '16 at 10:10