问题
I am using the below code to draw a marker on Google Maps in a android navigation app.
Marker marker = mMap.addMarker(
new MarkerOptions().position(current)
.anchor(0.5f, 0.3f)
.icon(BitmapDescriptorFactory.fromResource(
R.drawable.navigation_marker)));
This marker appears successfully, but the default small-sized marker does not get removed. So, eventually I have two markers at the same time. Can you please help on how to remove the default marker?
回答1:
Assuming you mean "the blue dot" or "my location", you will have to completly remove it using GoogleMap.setMyLocationEnabled
and use your own LocationClient
to update user's current position.
来源:https://stackoverflow.com/questions/16869192/how-to-remove-default-small-sized-google-map-marker-while-building-navigation-ap