如何创建一对经度和纬度来显示特定经度和纬度的2英里半径?在Java Android中

时间:2014-02-23 19:41:46

标签: java android google-maps latitude-longitude

我的深度有点:-)如何创建一对经度和纬度来创建一个显示特定经度和纬度2英里半径的多边形?在Java Android中。我知道如何找到你当前的经度和纬度,但我无法弄清楚上述情况。

到目前为止我的代码如下:

LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); 
Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
double longitude = location.getLongitude();
double latitude = location.getLatitude();

1 个答案:

答案 0 :(得分:0)

您可以使用LatLng创建对。

        LatLng origin = new LatLng(my_latitude,my_longitude);

要创建半径,您可以使用Genofencing技术。

https://developer.android.com/training/location/geofencing.html

相关问题