Baidu Map SDK uses (3) custom positioning ICONS

/** * Custom location descriptor BitmapDescriptor */ private BitmapDescriptor mIconLocation; \

// Set mIconLocation = bitmapDescriptorFactory. fromResource(r.rawable. Navi_map_gps_locked); // Set mIconLocation = bitmapDescriptorFactory. fromResource(r.rawable.

<span style="font-size:32px;">
MyLocationConfiguration myconfig = new MyLocationConfiguration(
		     LocationMode.NORMAL, true, mIconLocation);
mBaiduMap.setMyLocationConfigeration(myconfig);
</span>
Copy the code

Map status update:

	if(isFirstIn){// Enter the map for the first time to display the current location
		LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
	<span style="white-space:pre">	</span>MapStatusUpdate msu = MapStatusUpdateFactory.newLatLng(latLng);
		mBaiduMap.animateMapStatus(msu);
		isFirstIn = false;
	}
Copy the code

More detailed tutorial: Baidu Map in Android use \

\


\