使用 Google Maps API,显示以 {minLat, min Long} 和 {maxLat, maxLong} 为界的地图
Google 地图 API 需要 3 个参数来启动:纬度、经度和缩放级别。我想要的是根据最小纬度、最小长度、最大纬度和最大长度确定最接近的缩放级别,以便我的地图可以以正确的比例显示,不多也不少。有什么简单的方法可以做到这一点?
Google Maps APIs require 3 parameters to start with: lat, long and zoom level. What I want is to determine the closest zoom level based on the min lat, min long, max lat, and max long, so that my map can be displayed at the right scale, no more and no less. What's an easy way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用边界来适合您的地图。
Use bounds to fit your map.