简体   繁体   English

如何在Android中通过经度和纬度获取照片位置?

[英]How to get photo location by latitude and longitude in android?

How to get photo location by latitude and longitude in android? 如何在Android中通过经度和纬度获取照片位置? I already get the lat and lon, now I want to fetch photo location by lat and lon that i get before. 我已经有了纬度和经度,现在我想按之前获得的纬度和经度来获取照片位置。

The Places API now supports the return of one place photo if available for a Place Search request and up to ten place photos for a Place Details request. 现在,Places API支持返回一张地点照片(如果可用于地点搜索请求),最多返回十张地点照片(用于“ 地点详细信息”请求)。

If a photos array is returned with your request, you can pass the photo_reference from a contained photo object to a Place Photo request with the maxheight and/or maxwidth, sensor and key parameters: 如果您的请求返回了一个照片数组,则可以使用maxheight和/或maxwidth,sensor和key参数将photo_reference从包含的照片对象传递到Place Photo请求:

Here is great tutorial: Showing nearby places with photos at any location in Google Maps Android API V2 这是一个很棒的教程: 在Google Maps Android API V2中的任意位置显示附近的地点并带有照片

You can try Geocoder API to get address (If I am not mistaken, by location you mean address) for any latitude and longitude. 您可以尝试使用Geocoder API来获取任意纬度和经度的地址(如果我没记错的话,是指位置)。 It's getFromLocation method will fetch the address. 它的getFromLocation方法将获取地址。

Working example 工作实例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android中按地址位置获取经纬度 - How to get latitude and longitude by address location in Android 如何在Android中获取当前位置的经纬度? - How to get latitude and longitude of current location in Android? 如何在android中获取当前位置的经纬度 - How to get the current location latitude and longitude in android Android - 如何获取当前位置(经度和纬度)? - Android - How to get current location (latitude and longitude)? Android : 如何在经度和纬度中获取当前位置? - Android :How to get Current Location in Longitude and latitude? 如何在Android中获取当前位置的经度和纬度 - How to get latitude and longitude of current location in Android 如何获取用户在android中点击地图的位置的经度和纬度 - How to get the latitude and longitude of location where user taps on the map in android 如何从android中的Google定位服务获取经度和纬度 - how to get latitude & longitude from google location services in android 如何在Android中将当前位置作为经度和纬度? - How can I get the current location as a latitude and longitude in Android? 如何使用 Android mapview 在模拟器中获取当前位置(纬度和经度)? - How to get current location (latitude and longitude) in emulator using Android mapview?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM