Gaode map does not display the positioning point

Gaode map does not display the positioning point

First show the effect picture
insert image description here

I have tried many times by myself, and it will take effect after adding this attribute. I hope it will be useful to everyone.

// 显示定位层并且可以触发定位,默认是flase
aMap.setMyLocationEnabled(true);
MyLocationStyle mls = new MyLocationStyle();
 //设置是否显示定位小蓝点,用于满足只想使用定位,不想使用定位小蓝点的场景,设置false以后图面上不再有定位蓝点的概念,但是会持续回调位置信息。
 mls.showMyLocation(true);
// 显示定位层并且可以触发定位,默认是flase
aMap.setMyLocationEnabled(true);

You can also customize the anchor point style yourself

Bitmap locationBm = BitmapFactory.decodeResource(getResources(), R.drawable.location_marker);
//设置自定义的定位图标
mls.myLocationIcon(BitmapDescriptorFactory.fromBitmap(locationBm));

Guess you like

Origin blog.csdn.net/qq_37686995/article/details/102909438