Maximum Lat and Long bounds for the world - Google Maps API LatLngBounds()

后端 未结 4 2002
执念已碎
执念已碎 2020-12-02 08:58

The Google Maps terrain view by default has unlimited panning of the map tile. You can use LatLngBounds() to limit this, but what are the maximum and minimum co

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 10:03

    See this post in the old Google Groups, which describes the math of the projection.

    Quote:

    the map doesn't start at 85 degrees, but rather the degree that makes the map square. This is can be simply calaculated as: atan(sinh(PI)) *180 / PI = 85.05112878....

    Note that the tile calculation in that post is for the old API V2, but the projection should be the same.

提交回复
热议问题