[英]How can I get the longitude and latitude of a specific place using Google's GeoCoder Java Client?
[英]How do I get place id using latitude and longitude?
我想使用lat和lng獲取地點ID。 有一些代碼:
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
String title = marker.getTitle();
LatLng position = marker.getPosition();
marker.showInfoWindow();
double lat;
double lng;
lat = marker.getPosition().latitude;
lng = marker.getPosition().longitude;
return true;
}
});
當我單擊標記時,我想獲取地點ID。 我該怎么辦?
getPlace()
返回值:MarkerPlace
可能會幫助您。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.