---
title: "通过经纬度获取地址信息(googleMap v3)"
author: "y1d2y3xyz"
date: "2011-01-31T22:39:09Z"
tags: []
categories: ["Web前端"]
slug: "googlemap-v3"
draft: false
lastmod: "2011-01-31T22:39:09Z"
id: 900502
url: "https://lovebeyond.iteye.com/blog/900502"
---

```java

//必须要导入googleAPI才可以这么做 V3
var geocoder = new google.maps.Geocoder();
function parseAddress (weidu,jingdu,id){
	if(document.getElementById(id)!=null){
		geocoder.geocode({"address":weidu+","+jingdu}, function(results,status) {
			if (status == google.maps.GeocoderStatus.OK) {			 				document.getElementById(id).innerHTML=results[0].formatted_address;
                 }
		});
	}
}

```