Displaying a Place Description on Google Places API for iOS

被刻印的时光 ゝ 提交于 2020-01-01 08:53:20

问题


My apologies if this has been answered already. I cannot find it and I'm very new to the GooglePlaces API for iOS.

Question: How do I get a place's description using the Places API and display on an iOS app?

I'm not sure if this is even possible but I'd like to find out. Please see the attached image as to what I mean by place "description."

Google Place Description Example


回答1:


No worries, here are the links which you can refer for places description and places list.

-- This will help you to get list of Places based on your input. https://developers.google.com/places/web-service/search

-- This will help you to get more detail information about the place https://developers.google.com/places/web-service/details




回答2:


You have to make Place Details request which is an HTTP URL of the following form with required parameter:

https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=YOUR_API_KEY

key (YOUR_API_KEY) — Your application's API key. This key identifies your application for purposes of quota management and so that places added from your application are made immediately available to your app.

placeid (ChIJN1t_tDeuEmsRUsoyG83frY4) — A textual identifier that uniquely identifies a place, returned from a Place Search. For more information about place IDs, see the place ID overview. OR reference — A textual identifier that uniquely identifies a place, returned from a Place Search.

You can request output in JSON or XML format;

All above info from below site, please go through it: https://developers.google.com/places/web-service/details



来源:https://stackoverflow.com/questions/42193088/displaying-a-place-description-on-google-places-api-for-ios

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