百度地图自定义覆盖物

LayoutInflater inflater = getLayoutInflater();

View layout = inflater.inflate(R.layout.test, null);

Bitmap bg = getViewBitmap(layout);

BitmapDescriptor bdA = BitmapDescriptorFactory

.fromView(layout);

MarkerOptions ooA =newMarkerOptions().position(llA).icon(bdA)

.zIndex(9).draggable(true);

mMarkerA= (Marker) (mBaiduMap.addOverlay(ooA));


/**

* 地图状态发生变化

*/

mBaiduMap.setOnMapStatusChangeListener(newOnMapStatusChangeListener() {

public voidonMapStatusChangeStart(MapStatus status) {

updateMapState();

}

public voidonMapStatusChangeFinish(MapStatus status) {

updateMapState();

}

public voidonMapStatusChange(MapStatus status) {

updateMapState();

}

});

你可能感兴趣的:(百度地图自定义覆盖物)