@@ -96,18 +96,17 @@ public boolean onZoom(ZoomEvent event) {
9696
9797 private OnFragmentInteractionListener mListener ;
9898
99- final static String PARAM_LATITUDE = "latitude" ;
100- final static String PARAM_LONGITUDE = "longitude" ;
101- final static String PARAM_NEARBY_PLACE = "nearby_place" ;
99+ private final static String PARAM_LATITUDE = "latitude" ;
100+ private final static String PARAM_LONGITUDE = "longitude" ;
102101
103102 private SharedPreferences mPrefs ;
104103 private static final String MAP_PREFS = "map_prefs" ;
105104
106- final static String PREF_BASE_MAP = "base_map" ;
107- final static String PREF_OVERLAY = "overlay" ;
105+ private final static String PREF_BASE_MAP = "base_map" ;
106+ private final static String PREF_OVERLAY = "overlay" ;
108107
109- final static int BASE_MAP_OTM = 1 ;
110- final static int BASE_MAP_OSM = 2 ;
108+ private final static int BASE_MAP_OTM = 1 ;
109+ private final static int BASE_MAP_OSM = 2 ;
111110
112111
113112 private int mBaseMap = BASE_MAP_OTM ;
@@ -133,14 +132,6 @@ public static MapFragment newInstance(double lat, double lon) {
133132 return mapFragment ;
134133 }
135134
136- public static MapFragment newInstance (boolean showNearbyPlace ) {
137- MapFragment mapFragment = new MapFragment ();
138- Bundle arguments = new Bundle ();
139- arguments .putBoolean (PARAM_NEARBY_PLACE , showNearbyPlace );
140- mapFragment .setArguments (arguments );
141- return mapFragment ;
142- }
143-
144135 @ Override
145136 public void onCreate (Bundle savedInstanceState ) {
146137 super .onCreate (savedInstanceState );
@@ -225,9 +216,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
225216 final double lon = arguments .getDouble (PARAM_LONGITUDE );
226217 animateToLatLon (lat , lon );
227218 }
228- if (arguments .containsKey (PARAM_NEARBY_PLACE ) && arguments .getBoolean (PARAM_NEARBY_PLACE )) {
229- mListener .getSelectedNearbyPlace ();
230- }
231219 }
232220 if (mListener .getSelectedNearbyPlace () != null ) {
233221 showNearbyPlace (mListener .getSelectedNearbyPlace ());
@@ -419,7 +407,6 @@ public void setNearbyPlace() {
419407 }
420408
421409 private void showNearbyPlace (NearbyItem nearbyPlace ) {
422- //TODO: set overlay item
423410 mOverlayHelper .setNearby (nearbyPlace );
424411 animateToLatLon (nearbyPlace .getLat (), nearbyPlace .getLon ());
425412 }
0 commit comments