开发者

Understanding boundCenterBottom()

开发者 https://www.devze.com 2022-12-17 04:57 出处:网络
I’m trying to replicate the behavior of ItemizedOverlay.boundCenterBottom(), inside of one of my Overlay classes.

I’m trying to replicate the behavior of ItemizedOverlay.boundCenterBottom(), inside of one of my Overlay classes.

I am fairly certain tha开发者_运维百科t I can do this using setBounds(), but I am utterly lost as to what setBounds() is actually doing.


I believe I found the answer to be

mapIcon_ = mapView.getResources().getDrawable(R.drawable.map_marker_v);

mapIcon_.setBounds(-mapIcon_.getIntrinsicWidth() / 2,
                   -mapIcon.getIntrinsicHeight(), 
                    mapIcon_.getIntrinsicWidth() / 2,
                    0);
0

精彩评论

暂无评论...
验证码 换一张
取 消