mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Code style
This commit is contained in:
parent
0a86a31203
commit
2a7ef947ff
7 changed files with 47 additions and 19 deletions
|
|
@ -109,8 +109,8 @@ public class NearbyController {
|
|||
nearbyBaseMarker.title(place.name);
|
||||
nearbyBaseMarker.position(
|
||||
new com.mapbox.mapboxsdk.geometry.LatLng(
|
||||
place.location.latitude,
|
||||
place.location.longitude));
|
||||
place.location.getLatitude(),
|
||||
place.location.getLongitude()));
|
||||
nearbyBaseMarker.place(place);
|
||||
nearbyBaseMarker.icon(icon);
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ public class NearbyInfoDialog extends OverlayDialog {
|
|||
Bundle bundle = new Bundle();
|
||||
bundle.putString(ARG_TITLE, place.name);
|
||||
bundle.putString(ARG_DESC, place.description);
|
||||
bundle.putDouble(ARG_LATITUDE, place.location.latitude);
|
||||
bundle.putDouble(ARG_LONGITUDE, place.location.longitude);
|
||||
bundle.putDouble(ARG_LATITUDE, place.location.getLatitude());
|
||||
bundle.putDouble(ARG_LONGITUDE, place.location.getLongitude());
|
||||
bundle.putParcelable(ARG_SITE_LINK, place.siteLinks);
|
||||
mDialog.setArguments(bundle);
|
||||
DialogUtil.showSafely(fragmentActivity, mDialog);
|
||||
|
|
@ -138,7 +138,8 @@ public class NearbyInfoDialog extends OverlayDialog {
|
|||
@OnClick(R.id.link_preview_directions_button)
|
||||
void onDirectionsClick() {
|
||||
//Open map app at given position
|
||||
Uri gmmIntentUri = Uri.parse("geo:0,0?q=" + location.latitude + "," + location.longitude);
|
||||
Uri gmmIntentUri = Uri.parse(
|
||||
"geo:0,0?q=" + location.getLatitude() + "," + location.getLongitude());
|
||||
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
|
||||
|
||||
if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ public class NearbyListFragment extends ListFragment {
|
|||
Place place = (Place) listview.getItemAtPosition(position);
|
||||
LatLng placeLatLng = place.location;
|
||||
|
||||
double latitude = placeLatLng.latitude;
|
||||
double longitude = placeLatLng.longitude;
|
||||
double latitude = placeLatLng.getLatitude();
|
||||
double longitude = placeLatLng.getLongitude();
|
||||
|
||||
Timber.d("Item at position %d has coords: Lat: %f Long: %f", position, latitude, longitude);
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
MapboxMapOptions options = new MapboxMapOptions()
|
||||
.styleUrl(Style.OUTDOORS)
|
||||
.camera(new CameraPosition.Builder()
|
||||
.target(new LatLng(curLatLng.latitude, curLatLng.longitude))
|
||||
.target(new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude()))
|
||||
.zoom(11)
|
||||
.build());
|
||||
|
||||
|
|
@ -125,11 +125,11 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
*/
|
||||
public void addCurrentLocationMarker(MapboxMap mapboxMap) {
|
||||
MarkerOptions currentLocationMarker = new MarkerOptions()
|
||||
.position(new LatLng(curLatLng.latitude, curLatLng.longitude));
|
||||
.position(new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude()));
|
||||
mapboxMap.addMarker(currentLocationMarker);
|
||||
|
||||
List<LatLng> circle = createCircleArray(curLatLng.latitude, curLatLng.longitude,
|
||||
curLatLng.accuracy * 2, 100);
|
||||
List<LatLng> circle = createCircleArray(curLatLng.getLatitude(), curLatLng.getLongitude(),
|
||||
curLatLng.getAccuracy() * 2, 100);
|
||||
|
||||
mapboxMap.addPolygon(
|
||||
new PolygonOptions()
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ public class NearbyPlaces {
|
|||
|
||||
String query = wikidataQuery
|
||||
.replace("${RAD}", String.format(Locale.ROOT, "%.2f", radius))
|
||||
.replace("${LAT}", String.format(Locale.ROOT, "%.4f", cur.latitude))
|
||||
.replace("${LONG}", String.format(Locale.ROOT, "%.4f", cur.longitude))
|
||||
.replace("${LAT}", String.format(Locale.ROOT, "%.4f", cur.getLatitude()))
|
||||
.replace("${LONG}", String.format(Locale.ROOT, "%.4f", cur.getLongitude()))
|
||||
.replace("${LANG}", lang);
|
||||
|
||||
Timber.v("# Wikidata query: \n" + query);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue