remove unneeded codes copied from previous implementation

This commit is contained in:
neslihanturan 2019-05-27 11:18:18 +03:00
parent 4ec1346ec4
commit 42539651de

View file

@ -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);
} }