var ZdcEmapRefList_bk = ZdcEmapRefList || null; var ZdcEmapRefList = function () { if (!document.getElementById('center_point')) { return false; } if (typeof(ZdcEmapRefList_bk) == "function") { ZdcEmapRefList_bk(); } if (document.formTop && document.formTop.lat.value) { //mod to fix formTop is undefined => js die. var lat = document.formTop.lat.value; var lon = document.formTop.lon.value; } if (lat && lon) { addAddressCenter(lat,lon); } } // add address to item. function addAddressCenter(lat, lon) { if (lat && lon) { ZDC.Search.getAddrByLatLon({latlons: [new ZDC.LatLon(ZDC.msTodeg(lat),ZDC.msTodeg(lon))]},function (status, res) { if (status['code'] == '000' && res[0] && "address" in res[0]) { var max = document.getElementById('center_point').dataset.id; var text = '「' + res[0]['address']['text'] + '」' + 'の' + '
' + '検索結果は' + max + '件です'; document.getElementById('center_point').innerHTML = text; } }); } else { return false; } }