gpt4 book ai didi

Photos of particular place id(特定地点身份证的照片)

转载 作者:bug小助手 更新时间:2023-10-24 21:54:46 26 4
gpt4 key购买 nike



How I can get all the pictures of a particular "place_id"?

我如何才能获得特定“place_id”的所有图片?



When I retrieve the list of "places" in a particular location I have only access to one particular image "photo_reference".

当我检索特定位置的“位置”列表时,我只能访问一个特定的图像“PHOTO_REFERENCE”。



I want to show the details of place through its "places_id" (more specific search), but the result of the API function no associated picture appears. If you're looking through places that google places "id" concrete many more images appear. How I can recover them?

我想通过它的“Places_id”(更具体的搜索)来显示Place的详细信息,但API函数的结果是没有关联的图片。如果你正在浏览谷歌放置了“id”具体的地方,就会出现更多的图片。我怎么才能找回它们?



Thanks

谢谢


更多回答

Can you post some code and the url you're requesting? Just remove the api key from the url. Also an example place_id.

你能发布一些代码和你所要求的URL吗?只需从URL中删除API密钥即可。还有一个示例place_id。

I 've noticed that the place had no pictures , on the other hand , if you have google maps image shows a default image of "street view" , it is possible to put that image not available if any ?

我注意到这个地方没有图片,另一方面,如果你有谷歌地图图片显示的默认图片“街景”,有没有可能把那个图片放在不可用的地方?

Do you have an example place_id you're talking about?

您是否有您正在谈论的示例place_id?

Yes, this is the url "maps.googleapis.com/maps/api/place/details/…"

是的,这是URL“maps.googleapis.com/maps/api/place/details/…”

优秀答案推荐

You can use the street view image API when the places API doesn't return any photos. You can use the coordinates you receive from the places response in the request to the street view API to a link something like this:

当Places接口没有返回任何照片时,可以使用街景图像接口。您可以使用从街景API的请求中的Places响应收到的坐标来链接如下所示的链接:




https://maps.googleapis.com/maps/api/streetview?size=600x300&location=46.414382,10.013988&key=YOUR_API_KEY


You probably need to enable the street view api in the google developers console along with your places api.

您可能需要在Google开发人员控制台中启用街景API以及您的Places API。



Street view reference:
https://developers.google.com/maps/documentation/streetview/?hl=en

街景参考:https://developers.google.com/maps/documentation/streetview/?hl=en



Assuming you have an element with an id of attributions and an element with id of image you could do the following with the JavaScript API. Codepen: http://codepen.io/anon/pen/adooRp

假设您有一个属性ID为属性的元素和一个ID为IMAGE的元素,您可以使用JavaScript API执行以下操作。Codesen:http://codepen.io/anon/pen/adooRp



  var attributions = document.getElementById("attributions");   
var service = new google.maps.places.PlacesService(attributions);

var request = {
placeId: 'ChIJ10KlwAdzXg0RsH56kZsfcHs'
};

service.getDetails(request, function(place, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
var lat = place.geometry.location.lat();
var lng = place.geometry.location.lng();

var src = "https://maps.googleapis.com/maps/api/streetview?size=600x300&location="
+ lat + "," + lng + "&key=YOUR_API_KEY_HERE";

document.getElementById("image").src = src;

}
});

更多回答

Worth noting, this won't angle the street view frame towards the place, it'll just plonk the camera down at the lat/lng facing a random direction.

值得注意的是,这不会使街景画面朝向该位置,它只会将相机朝任意方向放在LAT/LNG上。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com