0

不知道这里发生了什么,但我希望它在设备移动时每秒再做一个圆圈。它所做的只是做1个圆圈。我希望圆圈突出显示我所走的路线。建议?谢谢

LocationManager locationmanager = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria cr = new Criteria();
String provider = locationmanager.getBestProvider(cr, true);
Location location = locationmanager.getLastKnownLocation(provider);

locationmanager.requestLocationUpdates(provider, 1000, 0, (LocationListener) this);




CircleOptions circleOptions = new CircleOptions()
.center(new LatLng(location.getLatitude(), location.getLongitude()));
circleOptions.radius(3.048); // In meters


mMap.addCircle(circleOptions);
4

1 回答 1

3

放:

CircleOptions circleOptions = new CircleOptions()
        .center(new LatLng(location.getLatitude(), location.getLongitude()));
circleOptions.radius(3.048); // In meters

mMap.addCircle(circleOptions);

内部onLocationChanged(Location location)回调。

于 2013-07-20T23:17:17.820 回答