Groups
Groups
Sign in
Groups
Groups
谷歌地图 API 论坛
Conversations
About
Send feedback
Help
有几个点,然后显示一张地图,要求边界是刚刚好将这几个点包含。
2 views
Skip to first unread message
焰 熊
unread,
Nov 26, 2009, 10:44:53 PM
11/26/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 谷歌地图 API 论坛
常规是setcenter 和zoom。在显示多个点时,有相应的设置地图的函数吗,还是要自己算中心或四个角坐标?
应该是个基础问题,但不知道,请指教。
Fei Chen
unread,
Nov 30, 2009, 2:50:24 AM
11/30/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
使用
GLatLngBounds
.extend()方法:
var bounds = new
GLatLngBounds
();
for(point in points){
bounds.extend(point);
}
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
2009/11/27 焰 熊
<
woyour...@gmail.com
>
Reply all
Reply to author
Forward
0 new messages