Android: Setting Zoom Level in Google Maps to include all Marker points

后端 未结 3 758
野性不改
野性不改 2021-01-30 05:07

I am trying to set zoom level for Maps in android such that it includes all the points in my list. I am using following code.

int minLatitude = Integer.MAX_VALU         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 06:00

    Part of the problem could be that MIN_VALUE is still a positive number, but latitudes and longitudes can be negative numbers. Try using NEGATIVE_INFINITY instead of MIN_VALUE.

提交回复
热议问题