不确定这里发生了什么,但我希望它在设备移动时每秒制作一个额外的圆圈。它所做的就是制作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);
答案 0 :(得分:3)
把:
CircleOptions circleOptions = new CircleOptions()
.center(new LatLng(location.getLatitude(), location.getLongitude()));
circleOptions.radius(3.048); // In meters
mMap.addCircle(circleOptions);