diff --git a/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java b/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
--- a/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
+++ b/app/src/main/java/it/reyboz/bustorino/ActivityPrincipal.java
@@ -769,6 +769,14 @@
             editor.putStringSet(SettingsFragment.KEY_ARRIVALS_FETCHERS_USE, utils.convertArrayToSet(defaultVals));
             edit=true;
         }
+        //Live bus positions
+        final String keySourcePositions=getString(R.string.pref_positions_source);
+        final String positionsSource = mainSharedPref.getString(keySourcePositions, "");
+        if(positionsSource.isEmpty()){
+            String[] defaultVals = getResources().getStringArray(R.array.positions_source_values);
+            editor.putString(keySourcePositions, defaultVals[0]);
+            edit=true;
+        }
         if (edit){
             editor.commit();
         }
diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/IntroFragment.kt b/app/src/main/java/it/reyboz/bustorino/fragments/IntroFragment.kt
--- a/app/src/main/java/it/reyboz/bustorino/fragments/IntroFragment.kt
+++ b/app/src/main/java/it/reyboz/bustorino/fragments/IntroFragment.kt
@@ -87,14 +87,17 @@
             }
             4 ->{
                 setImageBitmap(imageHolder, R.drawable.tuto_map)
-                val permGranted = (Permissions.anyLocationPermissionsGranted(requireContext()))
-                setInteractButtonState(ButtonState.LOCATION, !permGranted)
                 textView.text = utils.convertHtml(getString(R.string.tutorial_map))
-                interactButton.setOnClickListener {
-                    //ask location permission
-                    locationRequestResLauncher.launch(Permissions.LOCATION_PERMISSIONS)
+                if (Build.VERSION.SDK_INT >= 23) {
+                    //only show if running on Android M or above
+                    val permGranted = (Permissions.anyLocationPermissionsGranted(requireContext()))
+                    setInteractButtonState(ButtonState.LOCATION, !permGranted)
+                    interactButton.setOnClickListener {
+                        //ask location permission
+                        locationRequestResLauncher.launch(Permissions.LOCATION_PERMISSIONS)
+                    }
+                    interactButton.visibility = View.VISIBLE
                 }
-                interactButton.visibility = View.VISIBLE
 
             }
             5 ->{
diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/LinesDetailFragment.kt b/app/src/main/java/it/reyboz/bustorino/fragments/LinesDetailFragment.kt
--- a/app/src/main/java/it/reyboz/bustorino/fragments/LinesDetailFragment.kt
+++ b/app/src/main/java/it/reyboz/bustorino/fragments/LinesDetailFragment.kt
@@ -88,6 +88,7 @@
     private lateinit var switchButton: ImageButton
 
     private var favoritesButton: ImageButton? = null
+    private lateinit var locationIcon: ImageButton
     private var isLineInFavorite = false
     private var appContext: Context? = null
     private val lineSharedPrefMonitor = SharedPreferences.OnSharedPreferenceChangeListener { pref, keychanged ->
@@ -97,6 +98,8 @@
             isLineInFavorite = favorites.contains(lineID)
             //if the button has been intialized, change the icon accordingly
             favoritesButton?.let { button->
+                //avoid crashes if fragment not attached
+                if(context==null) return@let
                 if(isLineInFavorite) {
                     button.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ic_star_filled, null))
                     appContext?.let {  Toast.makeText(it,R.string.favorites_line_add,Toast.LENGTH_SHORT).show()}
@@ -170,6 +173,7 @@
         val rootView = inflater.inflate(R.layout.fragment_lines_detail, container, false)
         lineID = requireArguments().getString(LINEID_KEY, "")
         switchButton = rootView.findViewById(R.id.switchImageButton)
+        locationIcon = rootView.findViewById(R.id.locationEnableIcon)
         favoritesButton = rootView.findViewById(R.id.favoritesButton)
         stopsRecyclerView = rootView.findViewById(R.id.patternStopsRecyclerView)
         descripTextView = rootView.findViewById(R.id.lineDescripTextView)
@@ -205,21 +209,44 @@
             if(map.visibility == View.VISIBLE){
                 map.visibility = View.GONE
                 stopsRecyclerView.visibility = View.VISIBLE
+                locationIcon.visibility = View.GONE
 
                 viewModel.setMapShowing(false)
                 liveBusViewModel.stopMatoUpdates()
+                //map.overlayManager.remove(busPositionsOverlay)
+
                 switchButton.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_map_white_30))
             } else{
                 stopsRecyclerView.visibility = View.GONE
                 map.visibility = View.VISIBLE
+                locationIcon.visibility = View.VISIBLE
                 viewModel.setMapShowing(true)
+
+                //map.overlayManager.add(busPositionsOverlay)
+                //map.
                 if(useMQTTPositions)
-                    liveBusViewModel.requestMatoPosUpdates(lineID)
+                    liveBusViewModel.requestMatoPosUpdates(GtfsUtils.getLineNameFromGtfsID(lineID))
                 else
                     liveBusViewModel.requestGTFSUpdates()
+
                 switchButton.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_list_30))
             }
         }
+        locationIcon.setOnClickListener {
+            if(locationOverlay.isMyLocationEnabled){
+                //switch off
+                locationOverlay.disableMyLocation()
+                locationIcon.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.location_circlew_grey))
+                //show message
+                Toast.makeText(requireContext(),R.string.location_disabled,Toast.LENGTH_SHORT).show()
+            } else{
+                //switch on
+                locationOverlay.enableMyLocation()
+                locationIcon.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.location_circlew_red))
+                //show message
+                Toast.makeText(requireContext(),R.string.location_enabled,Toast.LENGTH_SHORT).show()
+            }
+        }
         viewModel.setRouteIDQuery(lineID)
 
         val keySourcePositions = getString(R.string.pref_positions_source)
@@ -659,6 +686,17 @@
                                         ) {
         //Log.d(MapFragment.DEBUG_TAG, "Updating positions of the buses")
         //if(busPositionsOverlay == null) busPositionsOverlay = new FolderOverlay();
+        // cleanup the patterns
+        // at first run, the buses which have no direction are still displayed. If those become missing in the data,
+        // it becomes clear that they don't have the same direction
+        val currentBusesTripsIds = HashSet(busPositionMarkersByTrip.keys)
+        for (tripID in currentBusesTripsIds){
+            if (!tripsPatterns.keys.contains(tripID)){
+                //the tripId is not in the updates anymore, remove it
+                removeBusMarker(tripID)
+            }
+        }
+
         val noPatternsTrips = ArrayList<String>()
         for (tripID in tripsPatterns.keys) {
             val (update, tripWithPatternStops) = tripsPatterns[tripID] ?: continue
@@ -718,6 +756,8 @@
                 }
             }
         }
+
+
         if (noPatternsTrips.size > 0) {
             Log.i(DEBUG_TAG, "These trips have no matching pattern: $noPatternsTrips")
         }
diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/MapFragment.java b/app/src/main/java/it/reyboz/bustorino/fragments/MapFragment.java
--- a/app/src/main/java/it/reyboz/bustorino/fragments/MapFragment.java
+++ b/app/src/main/java/it/reyboz/bustorino/fragments/MapFragment.java
@@ -76,6 +76,8 @@
 import it.reyboz.bustorino.middleware.GeneralActivity;
 import it.reyboz.bustorino.util.Permissions;
 
+import static it.reyboz.bustorino.fragments.SettingsFragment.LIVE_POSITIONS_PREF_MQTT_VALUE;
+
 public class MapFragment extends ScreenBaseFragment {
 
     //private static final String TAG = "Busto-MapActivity";
@@ -234,7 +236,7 @@
         String keySourcePositions=getString(R.string.pref_positions_source);
         useMQTTViewModel = (
                 PreferenceManager.getDefaultSharedPreferences(requireContext())
-                        .getString(keySourcePositions,"mqtt").contentEquals("mqtt"));
+                        .getString(keySourcePositions,LIVE_POSITIONS_PREF_MQTT_VALUE).contentEquals(LIVE_POSITIONS_PREF_MQTT_VALUE));
 
 
         //Start map from bundle
@@ -363,7 +365,8 @@
         /// choose which to use
         String keySourcePositions=getString(R.string.pref_positions_source);
         useMQTTViewModel = PreferenceManager.getDefaultSharedPreferences(requireContext())
-                .getString(keySourcePositions,"mqtt").contentEquals("mqtt");
+                .getString(keySourcePositions,LIVE_POSITIONS_PREF_MQTT_VALUE).contentEquals(
+                        LIVE_POSITIONS_PREF_MQTT_VALUE);
         if(livePositionsViewModel !=null) {
             //gtfsPosViewModel.requestUpdates();
             if(useMQTTViewModel)
diff --git a/app/src/main/java/it/reyboz/bustorino/fragments/SettingsFragment.java b/app/src/main/java/it/reyboz/bustorino/fragments/SettingsFragment.java
--- a/app/src/main/java/it/reyboz/bustorino/fragments/SettingsFragment.java
+++ b/app/src/main/java/it/reyboz/bustorino/fragments/SettingsFragment.java
@@ -51,6 +51,7 @@
     Handler mHandler;
     public final static String PREF_KEY_STARTUP_SCREEN="startup_screen_to_show";
     public final static String KEY_ARRIVALS_FETCHERS_USE = "arrivals_fetchers_use_setting";
+    public final static String LIVE_POSITIONS_PREF_MQTT_VALUE="mqtt";
 
     private boolean setSummaryStartupPref = false;
 
diff --git a/app/src/main/java/it/reyboz/bustorino/viewmodels/LivePositionsViewModel.kt b/app/src/main/java/it/reyboz/bustorino/viewmodels/LivePositionsViewModel.kt
--- a/app/src/main/java/it/reyboz/bustorino/viewmodels/LivePositionsViewModel.kt
+++ b/app/src/main/java/it/reyboz/bustorino/viewmodels/LivePositionsViewModel.kt
@@ -85,7 +85,7 @@
     }
     // get the trip IDs in the DB
     private val gtfsTripsPatternsInDB = tripsIDsInUpdates.switchMap {
-        Log.i(DEBUG_TI, "tripsIds in updates changed: ${it.size}")
+        //Log.i(DEBUG_TI, "tripsIds in updates: ${it.size}")
         gtfsRepo.gtfsDao.getTripPatternStops(it)
     }
     //trip IDs to query, which are not present in the DB
diff --git a/app/src/main/res/drawable/location_circlew_grey.xml b/app/src/main/res/drawable/location_circlew_grey.xml
new file mode 100644
--- /dev/null
+++ b/app/src/main/res/drawable/location_circlew_grey.xml
@@ -0,0 +1,13 @@
+<vector android:height="40sp"
+        android:width="40sp"
+        android:viewportHeight="48"
+        android:viewportWidth="48"
+         xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="0.6"
+          android:fillColor="#c6c6c6"
+        android:pathData="M24.064,23.98m-23.21,0a23.21,23.21 0,1 1,46.42 0a23.21,23.21 0,1 1,-46.42 0"
+        android:strokeColor="#333333" android:strokeLineJoin="round"
+          android:strokeWidth="1.4"/>
+    <path android:fillColor="#333333"
+          android:fillType="evenOdd" android:pathData="m23.424,43.817c0,0 0.001,0 0.576,-0.817zM24.576,43.817 L24.58,43.815 24.589,43.808 24.621,43.785c0.027,-0.02 0.067,-0.048 0.117,-0.085 0.101,-0.074 0.246,-0.183 0.43,-0.324 0.368,-0.283 0.889,-0.697 1.513,-1.231 1.247,-1.066 2.91,-2.613 4.575,-4.54C34.564,33.78 38,28.319 38,22.077 38,18.345 36.526,14.766 33.902,12.125 31.277,9.485 27.715,8 24,8 20.285,8 16.723,9.485 14.098,12.125 11.474,14.766 10,18.345 10,22.077c0,6.243 3.436,11.703 6.744,15.529 1.666,1.927 3.329,3.474 4.575,4.54 0.624,0.534 1.145,0.948 1.513,1.231 0.184,0.141 0.329,0.25 0.43,0.324 0.05,0.037 0.09,0.065 0.117,0.085l0.032,0.023 0.009,0.006 0.004,0.003c0.345,0.243 0.808,0.243 1.153,0zM24,43 L24.576,43.817C24.576,43.817 24.576,43.818 24,43ZM29,22c0,2.761 -2.239,5 -5,5 -2.761,0 -5,-2.239 -5,-5 0,-2.761 2.239,-5 5,-5 2.761,0 5,2.239 5,5z"/>
+</vector>
diff --git a/app/src/main/res/drawable/location_circlew_red.xml b/app/src/main/res/drawable/location_circlew_red.xml
new file mode 100644
--- /dev/null
+++ b/app/src/main/res/drawable/location_circlew_red.xml
@@ -0,0 +1,13 @@
+<vector android:height="40sp"
+        android:width="40sp"
+        android:viewportHeight="48"
+        android:viewportWidth="48"
+         xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="0.7"
+          android:fillColor="#f15000"
+        android:pathData="M24.064,23.98m-23.21,0a23.21,23.21 0,1 1,46.42 0a23.21,23.21 0,1 1,-46.42 0"
+        android:strokeColor="#333333" android:strokeLineJoin="round"
+          android:strokeWidth="1.4"/>
+    <path android:fillColor="#333333"
+          android:fillType="evenOdd" android:pathData="m23.424,43.817c0,0 0.001,0 0.576,-0.817zM24.576,43.817 L24.58,43.815 24.589,43.808 24.621,43.785c0.027,-0.02 0.067,-0.048 0.117,-0.085 0.101,-0.074 0.246,-0.183 0.43,-0.324 0.368,-0.283 0.889,-0.697 1.513,-1.231 1.247,-1.066 2.91,-2.613 4.575,-4.54C34.564,33.78 38,28.319 38,22.077 38,18.345 36.526,14.766 33.902,12.125 31.277,9.485 27.715,8 24,8 20.285,8 16.723,9.485 14.098,12.125 11.474,14.766 10,18.345 10,22.077c0,6.243 3.436,11.703 6.744,15.529 1.666,1.927 3.329,3.474 4.575,4.54 0.624,0.534 1.145,0.948 1.513,1.231 0.184,0.141 0.329,0.25 0.43,0.324 0.05,0.037 0.09,0.065 0.117,0.085l0.032,0.023 0.009,0.006 0.004,0.003c0.345,0.243 0.808,0.243 1.153,0zM24,43 L24.576,43.817C24.576,43.817 24.576,43.818 24,43ZM29,22c0,2.761 -2.239,5 -5,5 -2.761,0 -5,-2.239 -5,-5 0,-2.761 2.239,-5 5,-5 2.761,0 5,2.239 5,5z"/>
+</vector>
diff --git a/app/src/main/res/layout/fragment_intro.xml b/app/src/main/res/layout/fragment_intro.xml
--- a/app/src/main/res/layout/fragment_intro.xml
+++ b/app/src/main/res/layout/fragment_intro.xml
@@ -37,14 +37,16 @@
                     android:textColor="@color/grey_900"
                     android:fontFamily="@font/pitagon_medium"
                     app:layout_constraintBottom_toTopOf="@id/closeAllButton" app:layout_constraintEnd_toEndOf="parent"
-                    app:layout_constraintStart_toStartOf="parent"/>
+                    app:layout_constraintStart_toStartOf="parent"
+                    android:layout_marginBottom="5dp"
+            />
             <Button
                     android:text="@string/grant_location_permission"
                     android:layout_width="wrap_content"
                     android:visibility="gone"
                     android:layout_height="wrap_content" android:id="@+id/permissionButton"
                     app:layout_constraintTop_toBottomOf="@id/tutorialTextView"
-                    app:layout_constraintBottom_toBottomOf="@id/closeAllButton"
+                    app:layout_constraintBottom_toTopOf="@id/closeAllButton"
                     app:layout_constraintStart_toStartOf="@id/tutorialTextView"
                     android:backgroundTint="?colorPrimaryDark"
                     android:textColor="@color/white"
diff --git a/app/src/main/res/layout/fragment_lines_detail.xml b/app/src/main/res/layout/fragment_lines_detail.xml
--- a/app/src/main/res/layout/fragment_lines_detail.xml
+++ b/app/src/main/res/layout/fragment_lines_detail.xml
@@ -90,21 +90,21 @@
                                     app:layout_constraintStart_toStartOf="parent"
                                     app:layout_constraintEnd_toEndOf="parent"
                                     app:layout_constraintBottom_toBottomOf="parent"/>
-    <!--<ImageButton
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:id="@+id/icon_center_map"
-            android:src="@drawable/ic_center_map"
-
-            android:layout_marginTop="10dp"
-            android:layout_marginRight="10dp"
-            android:layout_marginEnd="10dp"
-            android:background="#00ffffff"
-            android:contentDescription="@string/bt_center_map_description"
-            app:layout_constraintTop_toTopOf="@id/lineMap"
-            app:layout_constraintEnd_toEndOf="@id/lineMap"
-            android:cropToPadding="true" />
+        <ImageButton
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:id="@+id/locationEnableIcon"
+                android:src="@drawable/location_circlew_red"
 
+                android:layout_marginTop="8dp"
+                android:layout_marginRight="8dp"
+                android:layout_marginEnd="8dp"
+                android:background="#00ffffff"
+                android:contentDescription="@string/enable_position"
+                app:layout_constraintTop_toTopOf="@id/lineMap"
+                app:layout_constraintEnd_toEndOf="@id/lineMap"
+                android:cropToPadding="true" />
+    <!--
     <ImageButton
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -148,6 +148,9 @@
     !-->
     <string name="bt_center_map_description">La mia posizione</string>
     <string name="bt_follow_me_description">Segui posizione</string>
+    <string name="enable_position">Abilita o disabilita posizione</string>
+    <string name="location_enabled">Posizione abilitata</string>
+    <string name="location_disabled">Posizione disabilitata</string>
 
     <!--
     Arrival times sources
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -169,6 +169,9 @@
    !-->
     <string name="bt_center_map_description">Center on my location</string>
     <string name="bt_follow_me_description">Follow me</string>
+    <string name="enable_position">Enable or disable location</string>
+    <string name="location_enabled">Location enabled</string>
+    <string name="location_disabled">Location disabled</string>
 
     <!--
     Arrival times sources