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/