From 61d25621154746653588cf3152b90d6156abaae9 Mon Sep 17 00:00:00 2001 From: "gu.martinm@gmail.com" Date: Wed, 9 Apr 2014 09:33:54 +0200 Subject: [PATCH] Weather Information: remove mylocation from map --- .../exampletdd/WeatherInformationMapActivity.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Android/WeatherInformation/src/de/example/exampletdd/WeatherInformationMapActivity.java b/Android/WeatherInformation/src/de/example/exampletdd/WeatherInformationMapActivity.java index 779a243..0b10019 100644 --- a/Android/WeatherInformation/src/de/example/exampletdd/WeatherInformationMapActivity.java +++ b/Android/WeatherInformation/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 { -- 2.1.4