js用地点得到谷歌坐标
window.g = {};
function fetchPoint_gg(city,address,kind2name){
if (GBrowserIsCompatible()) {//判断浏览器是否支持谷歌地图
g.geocoder = new GClientGeocoder();
g.geocoder.getLatLng(
address,
function (point) {
if (point) {
alert(point.lat());//x坐标
alert(point.lng());//y坐标
}
else {
alert("无法解析: " + address);
}
}
)
}
else {
alert('不支持的浏览器');
}
}