Weather Information: remove mylocation from map
authorgu.martinm@gmail.com <gu.martinm@gmail.com>
Wed, 9 Apr 2014 07:33:54 +0000 (09:33 +0200)
committergu.martinm@gmail.com <gu.martinm@gmail.com>
Wed, 9 Apr 2014 07:33:54 +0000 (09:33 +0200)
src/de/example/exampletdd/WeatherInformationMapActivity.java

index 779a243..0b10019 100644 (file)
@@ -47,7 +47,7 @@ public class WeatherInformationMapActivity extends Activity {
                 .findFragmentById(R.id.map);
 
         this.mMap = mapFragment.getMap();
-        this.mMap.setMyLocationEnabled(true);
+        this.mMap.setMyLocationEnabled(false);
         this.mMap.getUiSettings().setCompassEnabled(false);
         this.mMap.setOnMapLongClickListener(new LongClickListener());
 
@@ -191,21 +191,21 @@ public class WeatherInformationMapActivity extends Activity {
             final String city = (geocodingData.getCity() == null) ?
                     WeatherInformationMapActivity.this.getString(R.string.city_not_found)
                     : geocodingData.getCity();
-            final String country = (geocodingData.getCountry() == null) ?
-                    WeatherInformationMapActivity.this.getString(R.string.country_not_found)
-                    : geocodingData.getCountry();
-            final TextView cityCountry = (TextView) WeatherInformationMapActivity.this
+                    final String country = (geocodingData.getCountry() == null) ?
+                            WeatherInformationMapActivity.this.getString(R.string.country_not_found)
+                            : geocodingData.getCountry();
+                            final TextView cityCountry = (TextView) WeatherInformationMapActivity.this
                                     .findViewById(R.id.weather_map_citycountry_data);
-            cityCountry.setText(city + "," + country);
-
-            final LatLng point = new LatLng(geocodingData.getLatitude(), geocodingData.getLongitude());
-            if (WeatherInformationMapActivity.this.mMarker == null) {
-                WeatherInformationMapActivity.this.mMarker =
-                        WeatherInformationMapActivity.this.mMap.addMarker
-                            (new MarkerOptions().position(point).draggable(true));
-            } else {
-                WeatherInformationMapActivity.this.mMarker.setPosition(point);
-            }
+                            cityCountry.setText(city + "," + country);
+
+                            final LatLng point = new LatLng(geocodingData.getLatitude(), geocodingData.getLongitude());
+                            if (WeatherInformationMapActivity.this.mMarker == null) {
+                                WeatherInformationMapActivity.this.mMarker =
+                                        WeatherInformationMapActivity.this.mMap.addMarker
+                                        (new MarkerOptions().position(point).draggable(true));
+                            } else {
+                                WeatherInformationMapActivity.this.mMarker.setPosition(point);
+                            }
         }
 
         private GeocodingData getGeocodingData(final double latitude, final double longitude) throws IOException {