1var oMarkerCnt = 0 2var camp_tot_cnt 3var oSeq 4var oCnm 5var oRmk 6var oPic 7var oAddr 8var marker 9var infowindow 10var map, position, mapType, mapLevel, rvo 11mapLevel = 3 12 13//ì í 14function Init(cnt) { 15 oSeq = new Array(cnt) 16 oCnm = new Array(cnt) 17 oRmk = new Array(cnt) 18 oPic = new Array(cnt) 19 oAddr = new Array(cnt) 20 marker = new Array(cnt) 21 infowindow = new Array(cnt) 22} 23//ì´ê¸°í 24/* 25function MapInit(seq,tp) { 26 getMapType(tp) 27 getLatLng(seq) 28} 29*/ 30function MapInit(tp,tmp_x,tmp_y,tp) { 31 getMapType(tp) 32 mapPosition(tmp_x,tmp_y) 33 mapSet() 34 setMarker(tmp_x,tmp_y,-1,tp) 35} 36 37//ì§ëìì¹ 38function mapPosition(tmp_x,tmp_y) { 39 position = new daum.maps.LatLng(tmp_y, tmp_x); 40} 41 42//ì§ëíì 43function getMapType(tp) { 44 switch(tp) { 45 case "R": mapType = 1; break; 46 case "S": mapType = 2; break; 47 case "H": mapType = 3; break; 48 } 49} 50 51//ì§ëìì± 52function mapSet() { 53 map = new daum.maps.Map(document.getElementById('map'), { 54 center: position, 55 level: mapLevel, 56 mapTypeId: mapType 57 //ROADMAP ì¼ë° ì§ë, SKYVIEW ì¤ì¹´ì´ë·°, HYBRID ì¤ì²© 58 }); 59 60 //map.addControl(new daum.maps.ZoomControl(), 5) 61 //map.addControl(new daum.maps.MapTypeControl(), 5) 62 63 rvo = new daum.maps.RoadviewOverlay() 64 daum.maps.event.addListener(map,"click",function(event){ 65 if(document.getElementById("roadViewTp").innerHTML=="Y") { 66 tmp_lng = event.latLng.getLng() 67 tmp_lat = event.latLng.getLat() 68 RoadViewSet(tmp_lng,tmp_lat) 69 } 70 }); 71 daum.maps.event.addListener(map,"moveend",function(){ 72 tmpLatLng = map.getCenter() 73 document.getElementById("lat").innerHTML = tmpLatLng.getLat() 74 document.getElementById("lng").innerHTML = tmpLatLng.getLng() 75 }); 76 daum.maps.event.addListener(map,"zoom_changed",function(){ 77 //alert(map.getLevel()) 78 }); 79 daum.maps.event.addListener(map,"center_changed",function(){ 80 tmpLatLng = map.getCenter() 81 document.getElementById("lat").innerHTML = tmpLatLng.getLat() 82 document.getElementById("lng").innerHTML = tmpLatLng.getLng() 83 }); 84} 85 86//ë¡ëë·° ì 87function RoadViewLine() { 88 if(document.getElementById("roadViewTp").innerHTML=="N") { 89 rvo.setMap(map) 90 } else { 91 rvo.setMap() 92 } 93} 94 95//ì§ëíì ë³ê²½ 96function mapTypeMod(tp) { 97 if(document.getElementById('mapTp').innerHTML=="RoadView") { 98 document.getElementById('mapTp').innerHTML = tp 99 getLatLng(document.form.campseq.value) 100 } else { 101 getMapType(tp) 102 map.setMapTypeId(mapType) 103 } 104} 105 106//ë 벨ìì 107function mapLevelMod(tp) { 108 if(tp=="P") { 109 if(parseInt(mapLevel)-1 > 0) { 110 mapLevel--; 111 map.setLevel(mapLevel); 112 } else { 113 alert("ëì´ì íëíì¤ ì ììµëë¤.") 114 } 115 } else { 116 if(parseInt(mapLevel)+1 < 15) { 117 mapLevel++; 118 map.setLevel(mapLevel); 119 } else { 120 alert("ëì´ì ì¶ìíì¤ ì ììµëë¤.") 121 } 122 } 123} 124 125//ë§ì»¤ ì¤ì 126function setMarker(tmp_x,tmp_y,idx,tp) { 127 var pos = new daum.maps.LatLng(tmp_y, tmp_x); 128 if (idx<0) { 129 Mico = "/images/black_dot.png" 130 idx = 0 131 } 132 else { 133 Mico = "/images/black_dot.png" 134 } 135 var icon = new daum.maps.MarkerImage(Mico, 136 new daum.maps.Size(8,8), 137 new daum.maps.Point(4,0) 138 ) 139 if(tp=="P") { 140 marker[idx] = new daum.maps.Marker({ 141 position: pos, 142 image:icon 143 }); 144 } else { 145 marker[idx] = new daum.maps.Marker({ 146 position: pos 147 }); 148 } 149 marker[idx].setMap(map); 150 //marker[idx].setTitle(oCnm[idx]); 151 daum.maps.event.addListener(marker[idx],"click",function(){ 152 clkInfoWindow(idx) 153 //document.location.href="campDetail.asp?campseq="+oSeq[idx] 154 }); 155} 156 157//ì ë³´ì°½ ì¤ì 158function setInfoWindow(idx) { 159 infowindow[idx] = new daum.maps.InfoWindow({ 160 content: getInfoCntnt(oCnm[idx],oRmk[idx],oPic[idx],oAddr[idx],idx) 161 }); 162 if(idx==0) infowindow[idx].open(map, marker[idx]); 163} 164 165//ì ë³´ì°½ í´ë¦ì 166function clkInfoWindow(idx) { 167 for(i=0;i<oMarkerCnt;i++){ 168 infowindow[i].close(map, marker[i]); 169 } 170 infowindow[idx].open(map, marker[idx]); 171} 172 173 174//ì§ë ì¤ì ì¢í 175function getLatLng(seq,tp) { 176 $.ajax({ 177 type: "POST", 178 url: "/resv/axMapLatLng.hbb", 179 data:{seq:seq, tp: tp }, 180 success: onSuccess, 181 error: onError 182 }); 183 184 function onSuccess(dataobj) { 185 tmp_tp = document.getElementById("mapTp").innerHTML 186 mapLevel = document.getElementById("mapLevel").innerHTML 187 188 if (dataobj != 'N') { 189 arr_dataobj = dataobj.split('^') 190 oMarkerCnt = arr_dataobj.length 191 for(i=0; i<oMarkerCnt; i++) { 192 arr_dataobj_up = arr_dataobj[i].split('|'); 193 tmp_x = arr_dataobj_up[0] 194 tmp_y = arr_dataobj_up[1] 195 oSeq[i] = arr_dataobj_up[2] 196 oCnm[i] = arr_dataobj_up[3] 197 oRmk[i] = arr_dataobj_up[4] 198 oPic[i] = arr_dataobj_up[5] 199 oAddr[i] = arr_dataobj_up[6] 200 if(i==0) {
201 MapInit(tmp_tp,tmp_x,tmp_y,tp) 202 c_x = tmp_x 203 c_y = tmp_y 204 } else { 205 setMarker(tmp_x,tmp_y,i,tp) 206 } 207 if (tp!="U") setInfoWindow(i) 208 } 209 //map.setCenter(new daum.maps.LatLng(c_y, c_x)) 210 if (tp!="U") { 211 for(i=1; i<oMarkerCnt; i++) { 212 infowindow[i].open(map, marker[i]);//ico_favor.png 213 } 214 } 215 } 216 } 217 function onError() { 218 } 219 220} 221 222 223//ì ë³´ì°½ 224function getInfoCntnt(cnm,rmk,pic,addr,idx) { 225 cntnt = '<div style="font-size:11px;text-align:center;padding:3px 10px;"><b>'+cnm+'</b></div>' 226 //cntnt = '<DIV style="color:black;width:165px;">' 227 //cntnt += ' <div style="float:left;font-size:11px;text-align:center;width:130px;margin-top:3px;" onClick="javascript:cback('+oSeq[idx]+');"><b>'+cnm+'</b></a></div>' 228 //cntnt += ' <div style="float:right;padding-right:5px;width:30px;margin-top:5px;" onClick="javascript:cback('+oSeq[idx]+');"><img src="/images/ico_move.png" border="0" style="cursor:hand"></div>'; 229 //cntnt += ' <div style="float:right;padding-right:5px;width:15px;margin-top:5px;"><img src="/images/btn_pop_close.gif" border="0" onclick="infowindow['+idx+'].close(map, marker['+idx+']);" style="cursor:hand"></div>'; 230 //cntnt += '</div>' 231 return cntnt 232} 233 234//ì§ëì´ë 235function goCampUrl(url) { 236 opener.location.href=url 237 window.close(); 238} 239 240//ë¡ëë·° ì´ê¸°í 241function RoadViewInit(seq) { 242 getRoadViewLatLng(seq) 243} 244 245//ë¡ëë·° ìì± 246function RoadViewSet(tmp_x,tmp_y) { 247 mapPosition(tmp_x,tmp_y) 248 var rc = new daum.maps.RoadviewClient(); 249 var rv = new daum.maps.Roadview(document.getElementById('map')) 250 rc.getNearestPanoId(position,50, function(panoid) { 251 if(panoid) { 252 document.getElementById("map").innerHTML = "" 253 document.getElementById("mapLevel").innerHTML = map.getLevel() 254 document.getElementById("mapControl2").style.display = "" 255 document.getElementById("mapControl").style.display = "none" 256 document.getElementById("mapTp").innerHTML = "RoadView" 257 rv.setPanoId(panoid); 258 //rv.setViewpoint({ pan:0, tilt:0, zoom:0 }); 259 } else { 260 alert("ë¡ëë·° ìë¹ì¤ì§ìì´ ìëëë¤.") 261 return 262 } 263 }); 264} 265 266//ì§ë ì¤ì ì¢í 267function getRoadViewLatLng(seq) { 268 var url = "/resv/axMapLatLng.hbb" 269 var param = "?seq="+seq+"&tp=m" 270 var myAjax = new Ajax.Request(url,{method: 'post', parameters: param , onComplete: cb_getRoadViewLatLng }); 271} 272 273//ì§ë ì¤ì ì¢í ì ì© 274function cb_getRoadViewLatLng(reqResult) { 275 var frm = document.form 276 var dataobj = reqResult.responseText; 277 if (dataobj != 'N') { 278 arr_dataobj_up = dataobj.split('|'); 279 tmp_x = arr_dataobj_up[0] 280 tmp_y = arr_dataobj_up[1] 281 RoadViewSet(tmp_x,tmp_y) 282 } else { 283 alert("주ìì ë³´ê° ì ííì§ ììµëë¤."); 284 } 285} 286 287//ì§ëë¡ ë³µê· 288function gomap() { 289 document.getElementById("map").innerHTML = "" 290 document.getElementById("mapControl").style.display = "" 291 document.getElementById("mapControl2").style.display = "none" 292 document.getElementById("mapTp").innerHTML = "H" 293 document.getElementById("roadViewTp").innerHTML = "N" 294 document.getElementById("btn_map2").src = "/images/btn_roadview.gif" 295 getLatLng(document.form.campseq.value) 296} 297 298function mapAddr(addr) { 299 var mapContainer = document.getElementById('map'), // ì§ë를 íìí div 300 mapOption = { 301 center: new daum.maps.LatLng(33.450701, 126.570667), // ì§ëì ì¤ì¬ì¢í 302 level: 3 // ì§ëì íë ë 벨 303 }; 304 305 // ì§ë를 ìì±í©ëë¤ 306 var map = new daum.maps.Map(mapContainer, mapOption); 307 308 // 주ì-ì¢í ë³í ê°ì²´ë¥¼ ìì±í©ëë¤ 309 var geocoder = new daum.maps.services.Geocoder(); 310 311 // 주ìë¡ ì¢í를 ê²ìí©ëë¤ 312 geocoder.addressSearch(addr, function(result, status) { 313 314 // ì ìì ì¼ë¡ ê²ìì´ ìë£ëì¼ë©´ 315 if (status === daum.maps.services.Status.OK) { 316 317 var coords = new daum.maps.LatLng(result[0].y, result[0].x); 318 319 // ê²°ê³¼ê°ì¼ë¡ ë°ì ìì¹ë¥¼ ë§ì»¤ë¡ íìí©ëë¤ 320 var marker = new daum.maps.Marker({ 321 map: map, 322 position: coords 323 }); 324 325 // ì¸í¬ìëì°ë¡ ì¥ìì ëí ì¤ëª ì íìí©ëë¤ 326 //var infowindow = new daum.maps.InfoWindow({ 327 //content: '<div style="width:150px;text-align:center;">ì°ë¦¬íì¬</div>' 328 //}); 329 //infowindow.open(map, marker); 330 331 // ì§ëì ì¤ì¬ì ê²°ê³¼ê°ì¼ë¡ ë°ì ìì¹ë¡ ì´ëìíµëë¤ 332 map.setCenter(coords);
333 } 334 }); 335}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.