Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding boundCenterBottom()

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

I am fairly certain that I can do this using setBounds(), but I am utterly lost as to what setBounds() is actually doing.

like image 578
Hamy Avatar asked Jan 20 '10 23:01

Hamy


1 Answers

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);
like image 75
Hamy Avatar answered Oct 03 '22 06:10

Hamy