mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-30 22:34:02 +01:00 
			
		
		
		
	LocationPickerActivity.java: remove redundant code
Before this change, there was two sections of code which moved the map center to the same location. Both of these code sections occur very close to each other (one in onCreate(), the other in setupMapView()) After this change, the code section in onCreate() has been removed. With the map centering code only in the setupMapView() method. This change eliminates redundancy, reduces the amount of code in onCreate(), and makes this java file easier to understand.
This commit is contained in:
		
							parent
							
								
									47eaff429a
								
							
						
					
					
						commit
						b803474e22
					
				
					 1 changed files with 0 additions and 10 deletions
				
			
		|  | @ -238,16 +238,6 @@ public class LocationPickerActivity extends BaseActivity implements | |||
|                 cameraPosition.getLongitude())); | ||||
|         } | ||||
|         setupMapView(); | ||||
|          | ||||
|         if("UploadActivity".equals(activity)){ | ||||
|             if(mapView != null && mapView.getController() != null && cameraPosition != null){ | ||||
|                 GeoPoint cameraGeoPoint = new GeoPoint(cameraPosition.getLatitude(), | ||||
|                     cameraPosition.getLongitude()); | ||||
| 
 | ||||
|                 mapView.getController().setCenter(cameraGeoPoint); | ||||
|                 mapView.getController().animateTo(cameraGeoPoint); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jason Whitmore
						Jason Whitmore