Skip to content Skip to sidebar Skip to footer

Cannot See The Blue Dot And Circle At Mylocation Maps

I want google maps to show the location of the user centered at the map as at the image 1 And this is my Fragment Code: public class MapFragment extends Fragment implements OnMapR

Solution 1:

Try Code samples of Google.

The ApiDemos repository on GitHub includes samples that demonstrate the use of location on a map:

You can use the My Location layer and the My Location button to provide your user with their current position on the map.

Note: Before enabling the My Location layer, you must ensure that you have the required runtime location permission.

Enable the My Location layer on the map as follows:

mMap.setMyLocationEnabled(true);

When the My Location layer is enabled, the My Location button appears in the top right corner of the map. When a user clicks the button, the camera centers the map on the current location of the device, if it is known. The location is indicated on the map by a small blue dot if the device is stationary, or as a chevron if the device is moving.

enter image description here

You can always check and compare your codes to the sample code to verify or check if your implementation is correct.

Hope this helps!

Post a Comment for "Cannot See The Blue Dot And Circle At Mylocation Maps"