Google Groups Home
Help | Sign in
GLatLng()的问题
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
  2 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
mumu0726  
View profile
 More options Jul 17, 4:19 am
From: mumu0726 <liubaozhong0...@gmail.com>
Date: Thu, 17 Jul 2008 01:19:42 -0700 (PDT)
Local: Thurs, Jul 17 2008 4:19 am
Subject: GLatLng()的问题
GLatLng(),表示中国某个地方的经纬度数在那个地方可以查找~~~

    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.
韦小宝  
View profile
 More options Jul 17, 10:16 pm
From: 韦小宝 <rips...@163.com>
Date: Thu, 17 Jul 2008 19:16:15 -0700 (PDT)
Local: Thurs, Jul 17 2008 10:16 pm
Subject: Re: GLatLng()的问题
通过GMarker 标注地图上的位置。它实现 GOverlay 接口,因此用 GMap2.addOverlay() 方法添加到地图中。
其方法getPoint()可返回此标记锚定的地理坐标,返回值类型GLatLng
GEvent.addListener(gmapGoogleMap, 'click', mapClick);
function mapClick(marker, point) {
centerMarker = createMarker(point)
gmapGoogleMap.addOverlay(centerMarker);
centerMarker.openInfoWindowHtml(getMarkerText(centerMarker));
}

function createMarker(point, title) {
var cimage = "images/red-dot.png";
var icon = new GIcon();
icon.image = cimage;
icon.iconSize = new GSize(32, 32);
icon.iconAnchor = new GPoint(14, 32);
icon.infoWindowAnchor = new GPoint(14,0);
var cMarker = new GMarker(point,{icon:icon,draggable:true});
GEvent.addListener(cMarker, "click", function() {
cMarker.openInfoWindowHtml(getMarkerText(cMarker));
});
return cMarker;
}

function getMarkerText(cMarker){
return cMarker.getPoint()


    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