Android MapView -setting zoom automatically until all ItemizedOverlay's are visible

前端 未结 2 1167
忘掉有多难
忘掉有多难 2020-11-28 22:21

hard-coding the setZoom() within onCreate() feels very antiquated and I\'d like to enhance the user experience by initially having the MapView set the zoom until all GeoPoin

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 22:56

    There's no magical way to achieve this. I suggest to iterate through all your overlayitems to obtain the center and span of all these items. Then set the center and span accordingly for the map

提交回复
热议问题