我正试图在我的一个Overlay类中复制ItemizedOverlay.boundCenterBottom()
的行为。
我很确定我可以使用setBounds()
执行此操作,但我完全不知道setBounds()
实际上在做什么。
答案 0 :(得分:8)
我相信我找到了答案
mapIcon_ = mapView.getResources().getDrawable(R.drawable.map_marker_v);
mapIcon_.setBounds(-mapIcon_.getIntrinsicWidth() / 2,
-mapIcon.getIntrinsicHeight(),
mapIcon_.getIntrinsicWidth() / 2,
0);