mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Code style fixes
This commit is contained in:
parent
a62bfd2001
commit
0a86a31203
3 changed files with 7 additions and 5 deletions
|
|
@ -4,7 +4,7 @@ public class LatLng {
|
||||||
|
|
||||||
public final double latitude;
|
public final double latitude;
|
||||||
public final double longitude;
|
public final double longitude;
|
||||||
public final float accuracy;
|
private final float accuracy;
|
||||||
|
|
||||||
/** Accepts latitude and longitude.
|
/** Accepts latitude and longitude.
|
||||||
* North and South values are cut off at 90°
|
* North and South values are cut off at 90°
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ public class LocationServiceManager implements LocationListener {
|
||||||
double currentLatitude = location.getLatitude();
|
double currentLatitude = location.getLatitude();
|
||||||
double currentLongitude = location.getLongitude();
|
double currentLongitude = location.getLongitude();
|
||||||
latestLocationAccuracy = location.getAccuracy();
|
latestLocationAccuracy = location.getAccuracy();
|
||||||
Timber.d("Latitude: %f Longitude: %f Accuracy %f", currentLatitude, currentLongitude, latestLocationAccuracy);
|
Timber.d("Latitude: %f Longitude: %f Accuracy %f",
|
||||||
|
currentLatitude, currentLongitude, latestLocationAccuracy);
|
||||||
|
|
||||||
latestLocation = new LatLng(currentLatitude, currentLongitude, latestLocationAccuracy);
|
latestLocation = new LatLng(currentLatitude, currentLongitude, latestLocationAccuracy);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -146,11 +146,12 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
||||||
*
|
*
|
||||||
* @return List List of LatLng points of the circle.
|
* @return List List of LatLng points of the circle.
|
||||||
*/
|
*/
|
||||||
public List<LatLng> createCircleArray(double centerLat, double centerLong, float radius, int nodes) {
|
public List<LatLng> createCircleArray(
|
||||||
|
double centerLat, double centerLong, float radius, int nodes) {
|
||||||
List<LatLng> circle = new ArrayList<>();
|
List<LatLng> circle = new ArrayList<>();
|
||||||
float radiusKilometer = radius / 1000;
|
float radiusKilometer = radius / 1000;
|
||||||
double radiusLong = radiusKilometer /
|
double radiusLong = radiusKilometer
|
||||||
(111.320 * Math.cos(centerLat * Math.PI / 180));
|
/ (111.320 * Math.cos(centerLat * Math.PI / 180));
|
||||||
double radiusLat = radiusKilometer / 110.574;
|
double radiusLat = radiusKilometer / 110.574;
|
||||||
|
|
||||||
for (int i = 0; i < nodes; i++) {
|
for (int i = 0; i < nodes; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue