From: gu.martinm@gmail.com Date: Wed, 9 Apr 2014 07:33:54 +0000 (+0200) Subject: Weather Information: remove mylocation from map X-Git-Tag: weatherinformation-1.0~182 X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=982389902fe545206d31dc9e1e263aec5ba58b33;p=AndroidWeatherInformation Weather Information: remove mylocation from map --- diff --git a/src/de/example/exampletdd/WeatherInformationMapActivity.java b/src/de/example/exampletdd/WeatherInformationMapActivity.java index 779a243..0b10019 100644 --- a/src/de/example/exampletdd/WeatherInformationMapActivity.java +++ b/src/de/example/exampletdd/WeatherInformationMapActivity.java @@ -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 {