Radius of “viewable” region in google maps v3

前端 未结 4 1733
渐次进展
渐次进展 2020-12-22 22:41

I need to know how to retrieve the radius of the viewable zoom level in google maps API v3.

For example, if I am at zoom level 3, and depending on the users screen s

4条回答
  •  自闭症患者
    2020-12-22 23:07

    I believe Bounds have the getNorthEast() and getSouthWest() methods, but this would give you a rectangle (which bounds really is) and you could than calculate the distance between those two, etc. To calculate the circle out of that rectandle might be a bit of work...

    Maybe this will help: http://code.google.com/apis/maps/articles/mvcfun.html

    and the example: http://code.google.com/apis/maps/articles/mvcfun/step6.html

提交回复
热议问题