首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

google map api之查询座标

2012-07-26 
google map api之查询坐标function addressGps() {var myGeocodernew google.maps.Geocoder()var addres

google map api之查询坐标

function addressGps() {var myGeocoder=new google.maps.Geocoder();var address=document.getElementById('address').value;if(address==''){alert("請輸入您要查詢的地點名稱");return;}myGeocoder.geocode({'address':address}, function (results, status ){if(status == google.maps.GeocoderStatus.OK){//移動地圖中心點myMap.setCenter(results[0].geometry.location);var center = results[0].geometry.location;var newMaker = new google.maps.Marker({map: myMap,position: center });}else{alert('這個地址 google map 無資料!');}});}
?

热点排行