JS 개발 중 바 이 두 맵+도시 연동 실시 간 검색 주소 기능 구현
프로젝트 는 성 시내+상세 주소 의 경로 에 따라 주 소 를 조회 하 는 기능 을 실현 해 야 하기 때문이다.
사용 기술:바 이 두 맵 API+jQuery
실현 절차:
1.성 시내 3 급 연동(ps:이 작은 플러그 인의 출처 를 잊 어 버 렸 습 니 다)
area.js 도입
/*
* js
*/
function Dsy(){
this.Items = {};
}
Dsy.prototype.add = function(id,iArray){
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id){
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(var i=0;i<v;i++){
str+=("_"+(document.getElementById(s[i]).selectedIndex-1));
};
var ss=document.getElementById(s[v]);
with(ss){
length = 0;
options[0]=new Option(opt0[v],opt0[v]);
if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v){
if(dsy.Exists(str)){
ar = dsy.Items[str];
for(var i=0;i<ar.length;i++){
options[length]=new Option(ar[i],ar[i]);
}//end for
if(v){ options[0].selected = true; }
}
}//end if v
if(++v<s.length){change(v);}
}//End with
}
var dsy = new Dsy();
dsy.add("0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_0_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_0",[" "]);
dsy.add("0_1_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_1",[" "]);
dsy.add("0_2_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_2",[" "]);
dsy.add("0_3_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_3",[" "]);
dsy.add("0_4_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_3",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_4",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_1",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_3",[" "," "," "," "," "," "," "]);
dsy.add("0_5_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_5",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_5",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_1",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_2",[" "," "," "]);
dsy.add("0_6_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_9",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_6_11",[" "," "," "," "," "]);
dsy.add("0_6",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_1",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_2",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_3",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_4",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_5",[" "," "," "," "," "," "," "," "]);
dsy.add("0_7_6",[" "," "," "," "," "," "," "," "]);
dsy.add("0_7_7",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_8",[" "," "," "," "," "," "," "]);
dsy.add("0_7_9",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_10",[" "," "," "," "," "," "]);
dsy.add("0_7_11",[" "," "," "," "," "," "]);
dsy.add("0_7_12",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_7_13",[" "," "," "," "," "," "," "," "]);
dsy.add("0_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_0",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_1",[" "," "," "," "," "," "," "]);
dsy.add("0_8_2",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_3",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_4",[" "," "," "," "," "," "," "," "]);
dsy.add("0_8_5",[" "," "," "," "," "," "]);
dsy.add("0_8_6",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_7",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8_8",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_8",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_2",[" "," "," "," "," "]);
dsy.add("0_9_3",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_5",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_8",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_9",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_10",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_9_12",[" "," "," "," "," "," "]);
dsy.add("0_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_2",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_3",[" "," "," "," "," "," "," "," "]);
dsy.add("0_10_4",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_6",[" "," "," "," "," "," "," "," "]);
dsy.add("0_10_7",[" "," "," "," "," "," "]);
dsy.add("0_10_8",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10_9",[" "," "," "," "," "," "]);
dsy.add("0_10_10",[" "," "," "," "," "," "," "]);
dsy.add("0_10_11",[" "," "," "," "," "," "," "," "]);
dsy.add("0_10_12",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_1",[" "," "," "," "," "," "," "," "]);
dsy.add("0_11_2",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_3",[" "," "," "," "," "," "]);
dsy.add("0_11_4",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_5",[" "," "," "," "," "," "," "]);
dsy.add("0_11_6",[" "," "," "," "," "," "," "," "]);
dsy.add("0_11_7",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_8",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_9",[" "," "," "," "," "," "," "," "," N "," "," "," "," "," "," "," "," "]);
dsy.add("0_11_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_11",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_0",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_1",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_2",[" "," "," "," "," "]);
dsy.add("0_12_3",[" "," "," "," "," "," "," "]);
dsy.add("0_12_4",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_5",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_6",[" "," "," "," "," "," "," "]);
dsy.add("0_12_7",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_8",[" "," "," "," "," "]);
dsy.add("0_12_9",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_10",[" "," "," "," "," "]);
dsy.add("0_12_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_12",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_13",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_14",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_12_15",[" "," "," "," "," "," "," "]);
dsy.add("0_12_16",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_2",[" "," "," "," "," "]);
dsy.add("0_13_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","☆"]);
dsy.add("0_13_5",[" "," "," "," "," "," "]);
dsy.add("0_13_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_7",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_13",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_2",[" "," "," "," "," "]);
dsy.add("0_14_3",[" "," "," "," "]);
dsy.add("0_14_4",[" "," "," "]);
dsy.add("0_14_5",[" "," "," "," "," "," "," "," "]);
dsy.add("0_14_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","B "]);
dsy.add("0_14_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_14",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_0",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_1",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_2",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_4",[" "," "," "," "," "," "," "," "]);
dsy.add("0_15_5",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_6",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_8",[" "," "," "," "]);
dsy.add("0_15_9",[" "," "," "," "," "," "]);
dsy.add("0_15_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_11",[" "," "," "," "," "," "]);
dsy.add("0_15_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_13",[" "," "," "," "," "," "," "," "]);
dsy.add("0_15_14",[" "," "]);
dsy.add("0_15_15",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15_16",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_15",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_2",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_3",[" "," ","e "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_6",[" "," "," "," "," "," "," "]);
dsy.add("0_16_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_8",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_10",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_11",[" "," "," "," "," "," "," "]);
dsy.add("0_16_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_13",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_14",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_15",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16_16",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_16",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_0",[" "," ","~ "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_2",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_3",[" "," "," "," "," "," "," "]);
dsy.add("0_17_4",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_6",[" "," "," "]);
dsy.add("0_17_7",[" "," "," "," "," "," "," "]);
dsy.add("0_17_8",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_9",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_10",[" "," "," ","V "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17_11",[" "," "]);
dsy.add("0_17_12",[" "," "," "," "," "]);
dsy.add("0_17_13",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_17",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_1",[" "," "," "," "," "," "]);
dsy.add("0_18_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_3",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_6",[" "," "," "," "," "," "]);
dsy.add("0_18_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18_12",[" "," "," "," "," "," "," "]);
dsy.add("0_18_13",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_18",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_0",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_1",[" "," "," "," "," "," "]);
dsy.add("0_19_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_4",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_6",[" "," "," "," "," "]);
dsy.add("0_19_7",[" "," "," "," "," "," "," "," "]);
dsy.add("0_19_8",[" "," "," "," "," "," "," "," "]);
dsy.add("0_19_9",[" "," "," "," "," "," "]);
dsy.add("0_19_10",[" "," "," "," "," "," "]);
dsy.add("0_19_12",[" "," "," "]);
dsy.add("0_19_14",[" "," "," "," "," "," "," "]);
dsy.add("0_19_15",[" "," "," "," "," "]);
dsy.add("0_19_16",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19_17",[" "," "," "," "," "," "," "," "]);
dsy.add("0_19_18",[" "," "," "," "," "," "]);
dsy.add("0_19_19",[" "," "," "," "," "," "," "]);
dsy.add("0_19_20",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_19",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_0",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_3",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_4",[" "," "," "," "," "," "]);
dsy.add("0_20_5",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_6",[" "," "," "," "," "," "]);
dsy.add("0_20_7",[" "," "," "," "," "]);
dsy.add("0_20_8",[" "," "," "," "," "]);
dsy.add("0_20_9",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_12",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_20_13",[" "," "," "," "," "," "," "]);
dsy.add("0_20",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_21_0",[" "," "," "," "]);
dsy.add("0_21_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_21",[" "," "," "]);
dsy.add("0_22_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_1",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_2",[" "," "," "," "," "," "," "," "," D "," "," "," "," "," "," "]);
dsy.add("0_22_3",[" "," "," "," "," "," "," "," "]);
dsy.add("0_22_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_5",[" "," "," "," "," "," "," "," "]);
dsy.add("0_22_6",[" "," "," "," "," "," "," "," "]);
dsy.add("0_22_7",[" "," "," "," "," "," "," "," "]);
dsy.add("0_22_8",[" "," "," "," "," "," "," "," "," "," ","v "," "," "," "," "," "," "]);
dsy.add("0_22_9",[" "," "," "," "," "," "," "," "]);
dsy.add("0_22_10",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_12",[" "," "," "," "," "," "," "]);
dsy.add("0_22_13",[" "," "," "," "," "," "," "]);
dsy.add("0_22_14",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_15",[" "," "," "," "," "," "]);
dsy.add("0_22_16",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_17",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_18",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_19",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22_20",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_22",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_1",[" "," "," "," "," "," "]);
dsy.add("0_23_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_3",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_6",[" "," "," "," "," "," "," "," "," "," "," D "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_23",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_3",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_5",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_8",[" "," "," "," "," "," "," "," "]);
dsy.add("0_24_9",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_10",[" "," "," "," "," "," "]);
dsy.add("0_24_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_13",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_14",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_24_15",[" "," "," "," "," "]);
dsy.add("0_24",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_2",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_25",[" "," "," "," "," "," "," "]);
dsy.add("0_26_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_1",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_2",[" "," "," "," "," "]);
dsy.add("0_26_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_6",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_26",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_0",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_1",[" "," "," "," "]);
dsy.add("0_27_2",[" "," "," "," "," "," "," "," "]);
dsy.add("0_27_3",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_4",[" "," "," "," "," "," "," "]);
dsy.add("0_27_5",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_6",[" "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_7",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_8",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_9",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_27",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_0",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_1",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_2",[" "," "," "," "," "," "," "," "]);
dsy.add("0_28_3",[" "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_4",[" "," "," "," "," "," "," "," "]);
dsy.add("0_28_5",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_6",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_28_7",[" "," "," "," "," "," "," "," "]);
dsy.add("0_28",[" "," "," "," "," "," "," "," "]);
dsy.add("0_29_0",[" "," "," "," "," "," "," "," "]);
dsy.add("0_29_1",[" "," "," "," "]);
dsy.add("0_29_2",[" "," "," "," "," "," "]);
dsy.add("0_29_3",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_29_4",[" "," "," "]);
dsy.add("0_29",[" "," "," "," "," "]);
dsy.add("0_30_0",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_1",[" "," "," "," "]);
dsy.add("0_30_2",[" "," "," "," "]);
dsy.add("0_30_3",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_4",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_5",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_6",[" "," "," "," "," "]);
dsy.add("0_30_7",[" "," "," "," "," "]);
dsy.add("0_30_8",[" "," "," "," "," "," "," "]);
dsy.add("0_30_9",[" "," "," "," "," "]);
dsy.add("0_30_10",[" "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_11",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_12",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_13",[" "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_30_14",[" "," "," "," "," "," "," "," "," "]);
dsy.add("0_30",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_31_0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0_31",[" "]);
dsy.add("0_32_0",[" "]);
dsy.add("0_32",[" "]);
dsy.add("0_33_0",[" "]);
dsy.add("0_33",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
dsy.add("0",[" "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "]);
var s=["province","city","county"];// select name
var opt0 = [" "," "," 、 "];//
//
function _init_area(){ //
for(var i=0;i<s.length-1;i++){
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
}
change(0);
}
_init_area();
2.바 이 두 맵 API 도입 및 실례 화 맵
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
// Map
var map = new BMap.Map("map_container");
//
var point = new BMap.Point(113.270793, 23.135308);
// :
map.addControl(new BMap.NavigationControl());
// , ,
map.addControl(new BMap.ScaleControl());
map.centerAndZoom(point,11);
//
map.enableScrollWheelZoom(true);
//
//var icon = new BMap.Icon("img/icon.jpg",new BMap.Size(100,100));
//
var marker = new BMap.Marker(point);
//
map.addOverlay(marker);
//
var gc = new BMap.Geocoder();
//
function showLocationInfo(pt, rs){
var addComp = rs.addressComponents;
$("#longitude").val(pt.lng);
$("#latitude").val(pt.lat);
console.log(' :'+pt.lng+' '+pt.lat);
}
//
function deletePoint(){
var allOverlay = map.getOverlays();
for (var i = 0; i < allOverlay.length; i++){
map.removeOverlay(allOverlay[i]);
}
}
3.성 시내 와 사용자 가 주 소 를 입력 하여 주 소 를 조회 하기 전에 필요 한 판단 과 주소 의 조합
//
var _area={
//keyword:'',
_areaLists:$(".areaLists"),
_address:$("#address"),
unChecked:function(val){
return (val==''||typeof (val)=='undefined'||val==null||
val==' '||val==' '||val==' 、 ')?false:true;
},
list:function(){
//console.log(_areaLists.length);
var _joinArea='';
for(var i=0;i<this._areaLists.length;i++){
if(_area.unChecked(this._areaLists[i].value)){
_joinArea+=this._areaLists[i].value;
}
}
if(_area.unChecked(this._address.val())){
_joinArea+=' '+this._address.val();
//_joinArea=this._address.val();
console.log('here');
}
//console.log(_joinArea);
return _joinArea;
},
init:function(){
//
var _this=_area.list();
console.log('_this='+_this);
// local
var local = new BMap.LocalSearch(map, {
renderOptions:{map: map,autoViewport: true}
});
local.setSearchCompleteCallback(function (searchResult) {
var poi = searchResult.getPoi(0);
//document.getElementById("result_").value = poi.point.lng + "," + poi.point.lat;
map.centerAndZoom(poi.point, 11);
gc.getLocation(poi.point, function(rs){
showLocationInfo(poi.point, rs);
});
});
local.search(_this);
}
}
요약:전체 데모
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title> + API </title>
</head>
<style>
.ipt {
border: 1px solid #ddd;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.17) inset;
transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
border-radius: 0 !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
height: 34px;
padding: 0px 5px;
line-height: 30px\9;
}
* {
box-sizing: border-box;
}
.map {
width: 500px;
height: 300px;
border: 1px solid #999;
margin-left: 100px;
margin-top: 10px;
}
/* : copyright*/
#map_container.map .BMap_cpyCtrl.BMap_noprint.anchorBL{
display: none;
}
</style>
<body>
<select id="province" name="province" class="ipt areaLists" style="width:150px;"></select>
<select id="city" name="city" class="ipt areaLists" style="width:150px;"></select>
<select id="county" name="county" class="ipt areaLists" style="width:150px;"></select>
<input class="ipt" id="address" placeholder=" : A " style="width: 460px;">
<div id="map_container" class="map" ></div>
<!--<input id="result_">-->
<script src="//cdn.bootcss.com/jquery/2.2.3/jquery.js"></script>
<script src="area.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
<script>
// Map
var map = new BMap.Map("map_container");
//
var point = new BMap.Point(113.270793, 23.135308);
// :
map.addControl(new BMap.NavigationControl());
// , ,
map.addControl(new BMap.ScaleControl());
map.centerAndZoom(point,11);
//
map.enableScrollWheelZoom(true);
//
//var icon = new BMap.Icon("img/icon.jpg",new BMap.Size(100,100));
//
var marker = new BMap.Marker(point);
//
map.addOverlay(marker);
//
var gc = new BMap.Geocoder();
//
function showLocationInfo(pt, rs){
var addComp = rs.addressComponents;
$("#longitude").val(pt.lng);
$("#latitude").val(pt.lat);
console.log(' :'+pt.lng+' '+pt.lat);
}
//
function deletePoint(){
var allOverlay = map.getOverlays();
for (var i = 0; i < allOverlay.length; i++){
map.removeOverlay(allOverlay[i]);
}
}
//
var _area={
//keyword:'',
_areaLists:$(".areaLists"),
_address:$("#address"),
unChecked:function(val){
return (val==''||typeof (val)=='undefined'||val==null||
val==' '||val==' '||val==' 、 ')?false:true;
},
list:function(){
//console.log(_areaLists.length);
var _joinArea='';
for(var i=0;i<this._areaLists.length;i++){
if(_area.unChecked(this._areaLists[i].value)){
_joinArea+=this._areaLists[i].value;
}
}
if(_area.unChecked(this._address.val())){
_joinArea+=' '+this._address.val();
//_joinArea=this._address.val();
console.log('here');
}
//console.log(_joinArea);
return _joinArea;
},
init:function(){
//
var _this=_area.list();
console.log('_this='+_this);
// local
var local = new BMap.LocalSearch(map, {
renderOptions:{map: map,autoViewport: true}
});
local.setSearchCompleteCallback(function (searchResult) {
var poi = searchResult.getPoi(0);
//document.getElementById("result_").value = poi.point.lng + "," + poi.point.lat;
map.centerAndZoom(poi.point, 11);
gc.getLocation(poi.point, function(rs){
showLocationInfo(poi.point, rs);
});
});
local.search(_this);
}
}
// form
$("#province,#city,#county").change(function(){
deletePoint();
_area.init();
});
// : address
var _thisLength='';
$("#address").keydown(function(){
_thisLength=$(this).val().length;
console.log(' :'+_thisLength);
})
$("#address").keyup(function(){
var _newLength=$(this).val().length;
console.log(' :'+_thisLength);
var timer=setTimeout(function(){
if(_thisLength<=_newLength){
deletePoint();
_area.init();
}
else{
clearTimeout(timer);
}
},3000);
})
$("#address").blur(function(){
deletePoint();
_area.init();
})
//_area.init();
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<style>
.ipt {
border: 1px solid #ddd;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.17) inset;
transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
border-radius: 0 !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
height: 34px;
padding: 0px 5px;
line-height: 30px\9;
}
* {
box-sizing: border-box;
}
.map {
width: 500px;
height: 300px;
border: 1px solid #999;
margin-left: 100px;
margin-top: 10px;
}
/* : copyright*/
#map_container.map .BMap_cpyCtrl.BMap_noprint.anchorBL{
display: none;
}
</style>
<body>
<select id="province" name="province" class="ipt areaLists" style="width:150px;"></select>
<select id="city" name="city" class="ipt areaLists" style="width:150px;"></select>
<select id="county" name="county" class="ipt areaLists" style="width:150px;"></select>
<input class="ipt" id="address" placeholder=" : A " style="width: 460px;">
<div id="map_container" class="map" ></div>
<!--<input id="result_">-->
<script src="//cdn.bootcss.com/jquery/2.2.3/jquery.js"></script>
<script src="area.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
<script>
// Map
var map = new BMap.Map("map_container");
//
var point = new BMap.Point(113.270793, 23.135308);
// :
map.addControl(new BMap.NavigationControl());
// , ,
map.addControl(new BMap.ScaleControl());
map.centerAndZoom(point,11);
//
map.enableScrollWheelZoom(true);
//
//var icon = new BMap.Icon("img/icon.jpg",new BMap.Size(100,100));
//
var marker = new BMap.Marker(point);
//
map.addOverlay(marker);
//
var gc = new BMap.Geocoder();
//
function showLocationInfo(pt, rs){
var addComp = rs.addressComponents;
$("#longitude").val(pt.lng);
$("#latitude").val(pt.lat);
console.log(' :'+pt.lng+' '+pt.lat);
}
//
function deletePoint(){
var allOverlay = map.getOverlays();
for (var i = 0; i < allOverlay.length; i++){
map.removeOverlay(allOverlay[i]);
}
}
//
var _area={
//keyword:'',
_areaLists:$(".areaLists"),
_address:$("#address"),
unChecked:function(val){
return (val==''||typeof (val)=='undefined'||val==null||
val==' '||val==' '||val==' 、 ')?false:true;
},
list:function(){
//console.log(_areaLists.length);
var _joinArea='';
for(var i=0;i<this._areaLists.length;i++){
if(_area.unChecked(this._areaLists[i].value)){
_joinArea+=this._areaLists[i].value;
}
}
if(_area.unChecked(this._address.val())){
_joinArea+=' '+this._address.val();
//_joinArea=this._address.val();
console.log('here');
}
//console.log(_joinArea);
return _joinArea;
},
init:function(){
//
var _this=_area.list();
console.log('_this='+_this);
// local
var local = new BMap.LocalSearch(map, {
renderOptions:{map: map,autoViewport: true}
});
local.setSearchCompleteCallback(function (searchResult) {
var poi = searchResult.getPoi(0);
//document.getElementById("result_").value = poi.point.lng + "," + poi.point.lat;
map.centerAndZoom(poi.point, 11);
gc.getLocation(poi.point, function(rs){
showLocationInfo(poi.point, rs);
});
});
local.search(_this);
}
}
// form
$("#province,#city,#county").change(function(){
deletePoint();
_area.init();
});
// : address
var _thisLength='';
$("#address").keydown(function(){
_thisLength=$(this).val().length;
console.log(' :'+_thisLength);
})
$("#address").keyup(function(){
var _newLength=$(this).val().length;
console.log(' :'+_thisLength);
var timer=setTimeout(function(){
if(_thisLength<=_newLength){
deletePoint();
_area.init();
}
else{
clearTimeout(timer);
}
},3000);
})
$("#address").blur(function(){
deletePoint();
_area.init();
})
//_area.init();
</script>
</body>
</html>
위 에서 말씀 드 린 것 은 편집장 님 께 서 소개 해 주신 JS 개발 중 바 이 두 맵+도시 연동 이 실시 간 으로 조회 주소 기능 을 실현 하 는 데 도움 이 되 기 를 바 랍 니 다.궁금 한 점 이 있 으 시 면 메 시 지 를 남 겨 주세요.편집장 님 께 서 바로 답 해 드 리 겠 습 니 다.여기 서도 저희 사이트 에 대한 여러분 의 지지 에 감 사 드 립 니 다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[2022.04.19] 자바스크립트 this - 생성자 함수와 이벤트리스너에서의 this18일에 this에 대해 공부하면서 적었던 일반적인 함수나 객체에서의 this가 아닌 오늘은 이벤트리스너와 생성자 함수 안에서의 this를 살펴보기로 했다. new 키워드를 붙여 함수를 생성자로 사용할 때 this는...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.