地理的位置の相互変換




	
		
		
		        
	
	
		


// var address = " "; var geocoder, map, marker = null; geocoder = new qq.maps.Geocoder(); function codeAddress() { // geocoder.getLocation(address); geocoder.setComplete(function(result) { console.log(result); var local = "lat:"+result.detail.location.lat+" && lng:"+result.detail.location.lng $("#text").val(local); }); // geocoder.setError(function() { alert(" "); }); }; // var local = "34.222179,108.940613"; function addr() { $.ajax({ type : 'get', url : 'http://apis.map.qq.com/ws/geocoder/v1', dataType:'jsonp', data : { key:" ",// location:local,// output:"jsonp" // jsonp }, success : function(res) { console.log(res) if(res.status == 0){ var address = res.result.formatted_addresses.recommend; $("#text").val(address); }else { alert(" ") } }, error : function() { alert(" ") } }); }