Android Make Disappear or remove the blue dot on map v2

I am trying to replace the blue dot on the map of my application. My intention is to have a plane shaped icon instead of the usual blue dot. I achieve this and it works fine as follows:

//... GoogleMap.OnMyLocationChangeListener myLocationChangeListener = new GoogleMap.OnMyLocationChangeListener() { @Override public void onMyLocationChange(Location location) { LatLng loc = new LatLng(location.getLatitude(), location.getLongitude()); try{ myPositionMarker.remove(); } catch (Exception e){ //.. } myPositionMarker = mMap.addMarker(new MarkerOptions() .flat(true) .icon(BitmapDescriptorFactory .fromResource(R.drawable.plane)) .anchor(0.5f, 0.5f) .position( new LatLng(location.getLatitude(), location .getLongitude()))); //... } 

As I said, this works great, but now I see my icon and the blue dot:

enter image description here

I tried many ways to do this, but can't find any work. There are many examples of deleting the My Location button, but I don’t want to delete it.

I want to remove the blue dot.

enter image description here

I appreciate any help. Thanks in advance and greetings

* UPDATE:

Responding to a comment written by @tyczj, I delete my location button as follows:

 mMap.setMyLocationEnabled(true); mMap.getUiSettings().setMyLocationButtonEnabled(false); 

So my location button is not visible, but the blue dot is visible. Change the two booleans to false and then no longer work. There is no blue dot, but no location update. I'm a little confused. What am I doing wrong?

thanks

+7
android android-maps-v2 google-maps-markers
source share
1 answer

If you want to have a go go to my-location-button, you must have a google blue dot. If you do not need a blue dot, you will also not have a google to-my-location-button, and therefore you will have to implement it yourself. Just add requestLocationUpdates (GoogleApiClient client, LocationRequest request, LocationListener listener) to track the user's location and add a custom “go-to-my-location-button” button on top of the map.

+7
source share

All Articles