有人知道如何在用户点击地图时使默认的Google地图界面在信息窗口中显示经度和纬度坐标吗?
头部代码:
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=..." type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(13.175771, -59.556885), 10);
map.setUIToDefault();
}
}
</script>
正文代码:
<div id="map" style="width: 640px; height: 300px"></div>