Can I limit users to a specific range and zoom level on Google Maps?

爱⌒轻易说出口 提交于 2019-12-23 16:59:45

问题


I'm implementing a Google Map on a web-page. For the purpose of this project, I want to limit how far users can drag the map, so that they can only view a certain area that falls within two co-ordinates (one specifies north-west, the other, south-east, if you get my meaning).

What's the best way to implement this using the Google Maps API?

Is there a method I can call that will do this automatically?


回答1:


This method does what you want: http://econym.org.uk/gmap/range.htm



来源:https://stackoverflow.com/questions/572404/can-i-limit-users-to-a-specific-range-and-zoom-level-on-google-maps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!