0

我在我的android應用程序中使用了自動完成位置小部件。我想把界限設置到只有印度。但我不知道印度的LatLngBounds。任何人都有關於座標的想法嗎?什麼是印度的LatLngBounds?

+1

#2是不是這些類型的問題的站點。你應該谷歌座標,而不是在這裏問他們。 –

+0

我在這裏得到了答案。無論如何感謝您的幫助:) –

回答

8

你可以使用這個..

private static final LatLngBounds BOUNDS_INDIA = new LatLngBounds(new LatLng(23.63936, 68.14712), new LatLng(28.20453, 97.34466)); 
+0

它像一個魅力。謝謝! –

+0

在哪裏添加此BOUND_INDIA –

4

如果要覆蓋整個印度(雖然它也將覆蓋中國,巴基斯坦和孟加拉國的一些地區),使用範圍如下: -

public static final LatLngBounds BOUNDS_INDIA = new LatLngBounds(new LatLng(7.798000, 68.14712), new LatLng(37.090000, 97.34466)); 

按照谷歌文檔: -

public LatLngBounds (LatLng southwest, LatLng northeast) 

Creates a new bounds based on a southwest and a northeast corner. 

The bounds conceptually includes all points where: 

1. the latitude is in the range [northeast.latitude, southwest.latitude]; 
2. the longitude is in the range [southwest.longtitude, northeast.longitude] if southwest.longtitude ≤ northeast.longitude; 

要找到任何地方 使用的緯度和經度: - http://www.findlatitudeandlongitude.com/