close

【地址取经纬度】

http://maps.google.cn/maps/api/geocode/json?address=地址

例如http://maps.google.cn/maps/api/geocode/json?address=台北市中正區忠孝東路二段130

答案:

25.04252, 121.5319962

【经纬度取地址】

http://maps.google.cn/maps/api/geocode/json?latlng=纬度,经度

例如http://maps.google.cn/maps/api/geocode/json?latlng=25.04252, 121.5319962

答案:

100台灣台北市中正區忠孝東路二段130號


UNITY內取Google靜態地圖

var url = "";

var lat : float;

var lon : float;

var li : LocationInfo;

function Start () {

li = new LocationInfo();

lat = li.latitude; lon = li.longitude;

url="http://maps.google.com/maps/api/staticmap?center=53.01,18.6&zoom=13&size=800x600&type=hybrid&sensor=true?a.jpg";

var www : WWW = new WWW(url); yield www;

renderer.material.mainTexture=www.texture;

}

 

arrow
arrow
    全站熱搜

    GABY 發表在 痞客邦 留言(0) 人氣()