简体   繁体   中英

How to change google map default Current Location Marker color

I want to change the default current location marker color from blue to other . Any body help me out how to do that.

Below is the icon color which I want to change:

图像在这里

EDIT:
YOU CAN'T CHANGE THE DEFAULT ONE, YOU HAVE TO MAKE YOU OWN AND HIDE THE DEFAULT

You can use your own markers by adding them to the map.

MarkerOptions markerOptions = new MarkerOptions();
markerOptions.position(currentLocationMarker.getPosition());
markerOptions.title(getString(R.string.start));
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(mapPin));
originMarker = map.addMarker(markerOptions);

Additionally you can change the theme of the map using map style JSON files.

googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getActivity(), R.raw.map_night_style));

You can easily create you own style with google at the following link:
Style with google .

And here is the full documentation on customizing your map:
Documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM