Accessing the place image from Google Places for iOS

大憨熊 提交于 2019-12-12 03:09:20

问题


I'm trying to grab the image of locations from Google Places. The JSON output is as follows, but I don't see how to access the image of each location. I want to put this image in a tablview with the listing for each place.

  {
  "html_attributions" : [
    "Listings by \u003ca href=\"http://www.yellowpages.com.au/\"\u003eYellow Pages\u003c/a\u003e"
  ],
  "results" : [
    {
      "geometry" : {
        "location" : {
          "lat" : -33.8719830,
          "lng" : 151.1990860
        }
      },
        "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
        "id" : "677679492a58049a7eae079e0890897eb953d79b",
        "name" : "Zaaffran Restaurant - BBQ and GRILL, Darling Harbour",
        "rating" : 3.90,
        "reference" : "CpQBjAAAAHDHuimUQATR6gfoWNmZlk5dKUKq_n46BpSzPQCjk1m9glTKkiAHH_Gs4xGttdOSj35WJJDAV90dAPnNnZK2OaxMgogdeHKQhIedh6UduFrW53wtwXigUfpAzsCgIzYNI0UQtCj38cr_DE56RH4Wi9d2bWbbIuRyDX6tx2Fmk2EQzO_lVJ-oq4ZY5uI6I75RnxIQJ6smWUVVIHup9Jvc517DKhoUidfNPyQZZIgGiXS_SwGQ1wg0gtc",
        "types" : [ "restaurant", "food", "establishment" ],
        "vicinity" : "Harbourside Centre 10 Darling Drive, Darling Harbour, Sydney"
    },
    {
      "geometry" : {
        "location" : {
          "lat" : -33.8722580,
          "lng" : 151.1986550
        }
      },
        "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
        "id" : "27ea39c8fed1c0437069066b8dccf958a2d06f19",
        "name" : "Criniti's Darling Harbour",
        "rating" : 3.60,
        "reference" : "CnRwAAAA-5kh5WZ3m1CMTO3LslvhRtAYsrOcQP7wB9AE1bV5R6Bd46NN5wB16MtImXWQ9eS1nWVbV_j-8iXYXRpU13Efp1t_d-Dp4WfEsFcYj-_g6db1SC1vAukyeCyotjS5xrwhzqWWAhgmA4qIliWeev2u1BIQprWzxl_hkj_w3QdTiUBYKxoUDVTjF4RugJdaJWkC4n6w6pSajKw",
        "types" : [ "restaurant", "food", "establishment" ],
        "vicinity" : "Shop 461, 2-10 Darling Drive, Harbourside Shopping Centre, DARLING HARBOUR"
    },
    ...additional results...
  ],
  "status" : "OK"
}

https://developers.google.com/maps/documentation/places/


回答1:


The Google Places API does not currently support this feature. If you believe this would be a useful feature you can submit a 'Places API - Feature Request' here:

http://code.google.com/p/gmaps-api-issues/issues/entry?template=Places%20API%20-%20Feature%20Request



来源:https://stackoverflow.com/questions/9892772/accessing-the-place-image-from-google-places-for-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!