谷歌的地方阿比PlaceDetails照片参考 [英] Google place Api PlaceDetails Photo Reference
问题描述
我使用谷歌将阿比哪里是某些结果photo_reference(类似参考)值。我无法找到有关如何使用它来获取照片任何提及。我知道如何使用参考来获得PlaceDetail,我敢肯定photo_reference的使用将是类似的,但我不能找到这个photo_reference请求JSON / XML URL。感谢您的任何帮助。帕维尔
I am using Google Place Api where is on some results "photo_reference" (similar to "reference") value. I cannot find any mention about that how to use it to get that photo. I know how to use "reference" to get PlaceDetail and I am sure that usage of photo_reference will be similar, but I cannot find JSON/XML URL for this photo_reference request. Thank you for any help. Pavel
推荐答案
请看看这里的文档:<一href=\"https://developers.google.com/places/documentation/photos\">https://developers.google.com/places/documentation/photos
他们刚刚公布了新的将照片功能
They've just announced this new Place Photos feature
总之这是你应该如何使用这一新功能:
In short this is how you should use this new feature:
<一个href=\"https://maps.googleapis.com/maps/api/place/photo?photoreference=PHOTO_REFERENCE&sensor=false&maxheight=MAX_HEIGHT&maxwidth=MAX_WIDTH&key=YOUR_API_KEY\">https://maps.googleapis.com/maps/api/place/photo?photoreference=PHOTO_REFERENCE&sensor=false&maxheight=MAX_HEIGHT&maxwidth=MAX_WIDTH&key=YOUR_API_KEY
刚刚替补代替你自己的价值观:
just substitute your own values in place of:
- PHOTO_REFERENCE
- MAX_HEIGHT - int值从1到1600
- MAX_WIDTH - int值从1到1600
- YOUR_API_KEY
和你做
这篇关于谷歌的地方阿比PlaceDetails照片参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!