Google Groups Home
Help | Sign in
请教:地图级别根据给定坐标信息来进行自动缩放
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
mincgmap  
View profile
 More options Apr 29, 4:20 am
From: "mincgmap" <mincg...@minc.com.cn>
Date: Tue, 29 Apr 2008 16:20:55 +0800
Local: Tues, Apr 29 2008 4:20 am
Subject: 请教:地图级别根据给定坐标信息来进行自动缩放

hi,看到此贴的达人,你们好!
小弟现在想请教一个问题,望达人帮忙解决或者提供思路方法!
情况如下:
1.现在我有若干个标记,其中有2个标记标在武汉,即当地图在适当的级别(假设是在13级),我可以看到我在武汉设置的这2个标记。
2.其中有4个标记标在上海,即当地图在适当的级别(假设也是在第13级),我可以看到我在上海设置的这4个标记。
3.现在我要的是,地图能够有这样的效果【地图由在武汉的13级,自动缩放到某一级别(假设是第7级),刚好可以看到武汉和上海2个城市,然后,地图自动放大到 前面假设的13级,可以看到设置在上海的4个标记。】

可能还没有说的很明白,从技术角度上来讲,就是希望能够通过给定的坐标信息,来自动改变地图级别,当2个标记的地理坐标相离很近的时候,地图自动放大,直到刚好 能够让这2个标记显示再视图中;当2个标记的地理坐标相离很远的时候,地图自动缩小,直到刚好能够让这2个标记显示在视图中。也就是个不断放大缩小的过程。

通过上面的文字,也不知道小弟表达清楚没有?希望理解我意图的达人,能够给予一定的帮助,在此谢过了!并且欢迎大家一起讨论相关问题!

mincgmap
2008-04-29


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zhang Jingjun  
View profile
 More options Apr 29, 1:48 pm
From: "Zhang Jingjun" <zhang.jing...@gmail.com>
Date: Wed, 30 Apr 2008 01:48:00 +0800
Subject: Re: 请教:地图级别根据给定坐标信息来进行自动缩放

通过两个或者多个坐标值产生一个GLatLngBounds区域,然后用GLatLngBounds.getCenter()获得该区域的中心坐标,用GMap 2.getBoundsZoomLevel(
)获得针对该区域的地图级别。

2008/4/29 mincgmap <mincg...@minc.com.cn>:

--
阿图仔www.artozi.com
上海市中山北路3856弄2号中环大厦2506室
+86 (21) 52680420
MSN: jjzhang2...@hotmail.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minc  
View profile
 More options Apr 30, 1:48 am
From: minc <mincg...@minc.com.cn>
Date: Tue, 29 Apr 2008 22:48:43 -0700 (PDT)
Local: Wed, Apr 30 2008 1:48 am
Subject: Re: 请教:地图级别根据给定坐标信息来进行自动缩放
多谢回复,已经获解!

On 4月30日, 上午1时48分, "Zhang Jingjun" <zhang.jing...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google