1
如何使用place_id而不是經度和緯度座標創建位置標記?Google地圖標記使用PlaceID Android
public void onMapReady(GoogleMap map) {
LatLng sydney = new LatLng(-34, 151);
//I want to use the place_id to place in of the Latitude and Longitude
map.addMarker(new MarkerOptions().position(sydney).title(" Sydney"));
map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
謝謝,我已經選擇了這一點。雖然我認爲這可以做,而不是反向查找。 –
如果您擁有LatLong查詢中的PlaceId,請忽略第1步 - 但您只能通過有效的PlaceId(AFAIK)調用獲取地點詳情信息。 –