mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
remove unneeded codes copied from previous implementation
This commit is contained in:
parent
4ec1346ec4
commit
42539651de
1 changed files with 3 additions and 25 deletions
|
|
@ -189,31 +189,9 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Timber.d("Nearby map fragment created");
|
Timber.d("Nearby map fragment created");
|
||||||
|
Mapbox.getInstance(getActivity(),
|
||||||
Bundle bundle = this.getArguments();
|
getString(R.string.mapbox_commons_app_token));
|
||||||
if (bundle != null) {
|
Mapbox.getTelemetry().setUserTelemetryRequestState(false);
|
||||||
String gsonPlaceList = bundle.getString("PlaceList");
|
|
||||||
String gsonLatLng = bundle.getString("CurLatLng");
|
|
||||||
Type listType = new TypeToken<List<Place>>() {
|
|
||||||
}.getType();
|
|
||||||
String gsonBoundaryCoordinates = bundle.getString("BoundaryCoord");
|
|
||||||
List<Place> placeList = gson.fromJson(gsonPlaceList, listType);
|
|
||||||
Type curLatLngType = new TypeToken<fr.free.nrw.commons.location.LatLng>() {
|
|
||||||
}.getType();
|
|
||||||
Type gsonBoundaryCoordinatesType = new TypeToken<fr.free.nrw.commons.location.LatLng[]>() {}.getType();
|
|
||||||
curLatLng = gson.fromJson(gsonLatLng, curLatLngType);
|
|
||||||
baseMarkerOptions = NearbyController
|
|
||||||
.loadAttractionsFromLocationToBaseMarkerOptions(curLatLng,
|
|
||||||
placeList,
|
|
||||||
getActivity(),
|
|
||||||
bookmarkLocationDao.getAllBookmarksLocations());
|
|
||||||
boundaryCoordinates = gson.fromJson(gsonBoundaryCoordinates, gsonBoundaryCoordinatesType);
|
|
||||||
}
|
|
||||||
if (curLatLng != null) {
|
|
||||||
Mapbox.getInstance(getActivity(),
|
|
||||||
getString(R.string.mapbox_commons_app_token));
|
|
||||||
Mapbox.getTelemetry().setUserTelemetryRequestState(false);
|
|
||||||
}
|
|
||||||
setRetainInstance(true);
|
setRetainInstance(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue