1 var delayID = ""; 2 var delayTime = 500; // ëë ì´ë ìê° 3 var markers = []; 4 var infowindow = []; 5 var overlay = []; 6 var map = "" 7 var defaultLAT = "37.5146883"; //y 8 var defaultLNG = "127.0591567"; //x 9 10 var mode = "center"; 11 //리ì¤í¸ 12 var storeListHTML = '<li data-lng="<#StoreLNG#>" data-lat="<#StoreLAT#>" data-no="<#StoreNo#>"> ' + 13 ' <div class="num"><#StoreSort#></div> ' + 14 ' <div class="store_txt"> ' + 15 ' <p class="name"> ' + 16 ' <span><#StoreName#><strong class="distance"><#Distant#></strong></span> ' + 17 ' <a href="javascript:storePop2(\'<#StoreNo#>\');void(0);" class="btn_style6">ìì¸í보기</a> ' + 18 ' </p> ' + 19 ' <p class="tag"> ' + 20 ' <#StoreDecaffeine#><#StoreSoymilk#><#StoreParking#><#StoreWifi#><#Storesmoking#><#StoreEsmoking#><#StoreMachine#><#StoreCapsule#><#StoreCake#><#StoreDrive#><#StoreDelivery#><#StorePet#><#StoreHallCake#> ' + 21 ' </p> ' + 22 ' <p class="address"> ' + 23 ' <span><#StoreAddress#></span><!--span class="lot"><#StoreAddress2#></span--> ' + 24 ' </p> ' + 25 ' <p class="tel"><a href="tel:<#StoreTell#>"><#StoreTell#></a></p> ' + 26 ' </div> ' + 27 ' </li> '; 28 29// ' <span>ëì¹´íì¸<#StoreDecaffeine#></span> ' + 30// ' <span>ëì <#StoreSoymilk#></span> ' + 31// ' <span>ìì´íì´<#StoreWifi#></span> ' + 32// ' <span>주차ê°ë¥<#StoreParking#></span> ' + 33// ' <span>í¡ì°ê°ë¥<#Storesmoking#></span> ' + 34// ' <span>머ì í매<#StoreMachine#></span> ' + 35// ' <span>캡ìí매<#StoreCapsule#></span> ' + 36// ' <span>ì¼ìµìë ¹<#StoreCake#></span> ' + 37 //í´ë¦ ì¤ë²ë ì´ 38 var overlayContent = '<div class="wrap">' + 39 ' <div class="info">' + 40 ' <div class="title">' + 41 ' <#StoreName#>' + 42 ' <div class="close" onclick="resetOverlay()" title="ë«ê¸°"></div>' + 43 ' </div>' + 44 ' <div class="body">' + 45 ' <!--div class="img">' + 46 ' <#StoreSort#>' + 47 ' </div-->' + 48 ' <div class="desc">' + 49 ' <div class="ellipsis"><#StoreAddress#></div>' + 50 ' <div class="jibun ellipsis"><#StoreTell#></div>' + 51 ' <div><a href="javascript:storePop2(\'<#StoreNo#>\');void(0);" class="link" >ìì¸í보기</a></div>' + 52 ' </div>' + 53 ' </div>' + 54 ' </div>' + 55 '</div>'; 56 57 $(function(){ 58 59 //íì¬ìì¹ ì¡°íë¶í° ìì 60 //get_geo(); 61 loadDaumMap( defaultLAT, defaultLNG ); 62 63 //ì§ì리ì¤í¸ 64 storeLocal(); 65 66 jQuery("#location").click(function(){ 67 mode = "center"; get_geo(); 68 }) 69 jQuery("#chkall").change(function(){ 70 jQuery("input[id^=chk]").prop("checked", jQuery("#chkall").prop("checked")); 71 }) 72 jQuery("input[id^=chk]").change(function(){ 73 //setDaumMapMarker(map, '', '', '' ); 74 if ( jQuery("input[id^=chk]").not("input[id=chkall]").length - jQuery("input[id^=chk]:checked").not("input[id=chkall]").length == 0 ) { 75 jQuery("input[id=chkall]").prop("checked", true); 76 } else { 77 jQuery("input[id=chkall]").prop("checked", false); 78 } 79 }) 80 jQuery("#btnChkSearch").click(function(){ 81 setDaumMapMarker(map, '', '', '' ); 82 83 jQuery('.btn_condition').removeClass('on'); 84 jQuery('.condition_box').hide(); 85 }) 86 87 jQuery("#keyword").focus(function(){ 88 jQuery(this).val() == jQuery(this).attr("data-val") ? jQuery(this).val('') : "" ; 89 }).blur(function(){ 90 jQuery(this).val() == "" ? jQuery(this).val( jQuery(this).attr("data-val") ) : "" ; 91 }).keyup(function(e){ 92 e.keyCode == 13 ? searchStore() : "" ; 93 }) 94 95 jQuery("#petkeyword").focus(function(){ 96 jQuery(this).val() == jQuery(this).attr("data-val") ? jQuery(this).val('') : "" ; 97 }).blur(function(){ 98 jQuery(this).val() == "" ? jQuery(this).val( jQuery(this).attr("data-val") ) : "" ; 99 }).keyup(function(e){ 100 e.keyCode == 13 ? searchPetStore() : "" ; 101 }) 102 103 //STORE LOCATOR í´ë¦ 104 jQuery("#store_local").click(function(){ 105 mode = "center"; 106 resetSearch(); 107 get_geo(); 108 }) 109 //NEW STORE í´ë¦ 110 jQuery("#store_new").click(function(){ 111 mode = "new"; 112 resetSearch(); 113 newStore(); 114 115 }) 116 117 jQuery("#quick_srh").click(function(){ 118 mode = "center";
119 $('#chk11').prop('checked',false); 120 $("#store_local").css("display","block"); 121 $("#store_new").css("display","block"); 122 $(".store_tab").css("padding-top","75px"); 123 loadDaumMap( defaultLAT, defaultLNG ); 124 }) 125 126 jQuery("#region_srh").click(function(){ 127 mode = "center"; 128 $('#chk11').prop('checked',false); 129 $("#store_local").css("display","block"); 130 $("#store_new").css("display","block"); 131 $(".store_tab").css("padding-top","75px"); 132 loadDaumMap( defaultLAT, defaultLNG ); 133 }) 134 135 jQuery("#pet_srh").click(function(){ 136 //mode = "petcenter"; 137 $('#chk11').prop('checked',true); 138 $("#store_local").css("display","none"); 139 $("#store_new").css("display","none"); 140 $(".store_tab").css("padding-top","0"); 141 mode = "center"; 142 setDaumMapMarkerPet(map, '', '', '' ) 143 }) 144 145 }); 146 147 //íì¬ ìì¹ 148 function get_geo(){ 149// jQuery("#storeMap div").remove(); 150 try { 151 navigator.geolocation.getCurrentPosition(successCallback, errorCallback) 152 } catch(e) { 153 if ( defaultLAT != "" && defaultLNG != "") { 154 loadDaumMap( defaultLAT, defaultLNG ); 155 } 156 } 157 } 158 //íì¬ ìì¹ - ì±ê³µ 159 function successCallback(position) { 160 161 //alert(position.coords.latitude + ' ' + position.coords.longitude); 162 defaultLAT = position.coords.latitude; 163 defaultLNG = position.coords.longitude; 164 165 166 if ( defaultLNG != "" && defaultLAT != "" ) { 167 loadDaumMap( defaultLAT, defaultLNG ); 168 } 169 //defaultLNG = "" ; defaultLAT = ""; 170 } 171 //íì¬ ìì¹ - ì¤í¨ 172 function errorCallback(){ 173 //alert("fail"); 174 if ( defaultLAT != "" && defaultLNG != "" ) { 175 loadDaumMap( defaultLAT, defaultLNG ); 176 } 177 //defaultLAT = ""; defaultLNG = "" ; 178 } 179 //ë§ì»¤ ë° ì¸í¬ìëì° ìì í¨ì 180 function resetDaumMap(){ 181 jQuery("#storeListUL").html(''); 182 for (var i = 0; i < markers.length; i++) { 183 markers[i].setMap(null); 184 //infowindow[i].close(); 185 } 186 for (var i = 0; i < overlay.length; i++) { 187 overlay[i].setMap(null); 188 } 189 } 190 //ì¸í¬ìëì° ëª¨ë ìì 191 function resetInfowindow(){ 192 for (var i = 0; i < infowindow.length; i++) { 193 infowindow[i].close(); 194 } 195 } 196 //ì¤ë²ë ì´ ëª¨ë ìì 197 function resetOverlay(){ 198 for (var i = 0; i < overlay.length; i++) { 199 overlay[i].setMap(null); 200 } 201 } 202 203 //ê²ì, ì§ì ì´ê¸°í 204 function resetSearch(){ 205 jQuery("#keyword").val( jQuery("#keyword").attr("data-val") ); 206 jQuery("#localTitle").text( jQuery("#localTitle").attr("data-default") ); 207 jQuery("#localTitle2").text( jQuery("#localTitle2").attr("data-default") ) ; 208 } 209 210 // ë§µ ë¡ë© - ì¤ì¬ ì¢í ê¸°ì¤ 211 function loadDaumMap( storeLAT, storeLNG ){ 212 jQuery("#storeMap div").remove(); 213 var storeLAT = storeLAT; 214 var storeLNG = storeLNG; 215 216 var position = new daum.maps.LatLng(storeLAT, storeLNG); 217 var container = document.getElementById('storeMap'); 218 219 var options = { 220 center: position, 221 level: 4, 222 mapTypeId: daum.maps.MapTypeId.ROADMAP 223 }; 224 225 map = new daum.maps.Map(container, options); 226 227 var zoomControl = new daum.maps.ZoomControl(); 228 map.addControl(zoomControl, daum.maps.ControlPosition.RIGHT); 229 230 //ëëê·¸ ììì - ì§ë ì´ê¸°í 231 daum.maps.event.addListener(map, 'dragstart', function() { 232 if (mode == "center") { 233 resetDaumMap(); 234 } 235 }); 236 //ëëê·¸ ë - ë§ì»¤ë± ìì± 237 daum.maps.event.addListener(map, 'dragend', function() { 238 if (mode == "center") { 239 clearTimeout(delayID); 240 delayID = setTimeout(function(){ 241 var center = map.getCenter(); 242 setDaumMapMarker(map, center.getLat(), center.getLng(), 'center' ); 243 }, delayTime); 244 } 245 }); 246 //ì¤ì¬ ì¢í ë³ê²½ì ì¤í 247 daum.maps.event.addListener(map, 'center_changed', function() { 248 // 249 }); 250 251 if ( category == 2 ) { 252 mode = "new"; 253 newStore(); 254 category = ""; 255 } else { 256 if (mode == "center") { 257 setDaumMapMarker(map, "", "", "" ); 258 } 259 } 260 261 } 262 263 //ë°ì´í° ë¡ë© 264 function setDaumMapMarker(map, lat, lng, selectMode ){ 265 jQuery(".store_locator").addClass("on");jQuery(".store_locator").next(".cont").show(); 266 jQuery(".store_new").removeClass("on");jQuery(".store_new").next(".cont").hide(); 267 268 selectMode != "" ? mode = selectMode : mode = mode ; 269 var local = ""; 270 var local2 = ""; 271 var keyword = ""; 272 var sNo_temp = ""; 273 274 if (sNo != "" ) { 275 mode = 'search'; 276 sNo_temp = sNo; 277 sNo = ""; 278 279 } else { 280 switch(mode) { 281 case 'search' : ( 282 keyword = jQuery("#keyword").val() != jQuery("#keyword").attr("data-val") && jQuery("#keyword").val() != "" ? jQuery("#keyword").val() : "" , 283 jQuery("#storeLocal2").html(''), 284 lat = "", lng = "" 285 ); break; 286 case 'searchpet' : ( 287 keyword = jQuery("#petkeyword").val() != jQuery("#petkeyword").attr("data-val") && jQuery("#petkeyword").val() != "" ? jQuery("#petkeyword").val() : "" , 288 jQuery("#storeLocal2").html(''), 289 lat = "", lng = "" 290 ); break; 291 case 'local' : ( 292 lat = "", lng = "", 293 jQuery("#keyword").val('') , 294 local = ( jQuery("#localTitle").text() != jQuery("#localTitle").attr("data-default") && jQuery("#localTitle").text() != "" ) ? jQuery("#localTitle").text() : "", 295 local2 = ( jQuery("#localTitle2").text() != jQuery("#localTitle2").attr("data-default") && jQuery("#localTitle").text() != "" ) ? jQuery("#localTitle2").text() : "" 296 ); break; 297 case 'center' : ( 298 jQuery("#keyword").val(''), 299 ( lat == "" || lng == "" ) ? 300 ( 301 center = map.getCenter(), 302 lat = center.getLat(), lng = center.getLng() 303 ) : "" 304 ); break; 305 } 306 307// if (jQuery("#petkeyword").val() != "") { 308// keyword = jQuery("#petkeyword").val() != jQuery("#petkeyword").attr("data-val") && jQuery("#petkeyword").val() != "" ? jQuery("#petkeyword").val() : ""; 309// } 310 } 311 312 //mode == "search" ? ( keyword = jQuery("#keyword").val(), /*jQuery("#keyword").val(''),*/ lat = "", lng = "" ) : ( keyword = "", jQuery("#keyword").val(''), ( lat == "" || lng == "" ) ? ( center = map.getCenter(), lat = center.getLat(), lng = center.getLng() ) : "" ) 313 314 // mode2 - ì§ì ê²ì ì¼ë í´ë¹ ë°ì´í° ì¸ ëª¨ë ê°ì ì´ê¸°í í´ì¤ë¤ 315 //mode2 != "" ? ( mode = "search", keyword = "", lat = "", lng = "", jQuery("#keyword").val('') ) : mode = mode ; 316 317 var chk1 = jQuery("#chk1").prop("checked") ? 1 : 0 ; 318 var chk2 = jQuery("#chk2").prop("checked") ? 1 : 0 ; 319 var chk3 = jQuery("#chk3").prop("checked") ? 1 : 0 ; 320 var chk4 = jQuery("#chk4").prop("checked") ? 1 : 0 ; 321 var chk5 = jQuery("#chk5").prop("checked") ? 1 : 0 ; 322 var chk6 = jQuery("#chk6").prop("checked") ? 1 : 0 ; 323 var chk7 = jQuery("#chk7").prop("checked") ? 1 : 0 ; 324 var chk8 = jQuery("#chk8").prop("checked") ? 1 : 0 ; 325 var chk9 = jQuery("#chk9").prop("checked") ? 1 : 0 ; 326 var chk10 = jQuery("#chk10").prop("checked") ? 1 : 0 ; 327 var chk11 = jQuery("#chk11").prop("checked") ? 1 : 0 ; 328 var chk12 = jQuery("#chk12").prop("checked") ? 1 : 0 ; 329 var chk13 = jQuery("#chk13").prop("checked") ? 1 : 0 ; 330 331 jQuery.ajax({ 332 type: "GET", 333 datatype: "json", 334 data : { "lat" : lat, "lng" : lng , 335 "chk1" : chk1 , "chk2" : chk2 , "chk3" : chk3 , "chk4" : chk4 , "chk5" : chk5 , "chk6" : chk6 , "chk7" : chk7 , "chk8" : chk8 , "chk9" : chk9 , "chk10" : chk10 , "chk11" : chk11 , "chk12" : chk12 , "chk13" : chk13 ,
336 "keyword" : keyword, "StoreLocal" : local, "StoreLocal2" : local2, "storeNo" : sNo_temp }, 337 url: "store_data2.asp", 338 success: function (data) { 339 340 //clusterer.clear(); 341 342 //ë§ì»¤, ì¸í¬ ìëì° , 리ì¤í¸ ì´ê¸°í 343 resetDaumMap(); 344 positions = eval(data); 345 346 //ê²ì ì¼ë 첫ë²ì§¸ ììê° ì¼í°ë¡ ì¡í 347 if ( mode != "center" && positions.length > 0 ) { 348 map.setCenter( new daum.maps.LatLng(positions[0].StoreLAT, positions[0].StoreLNG) ); 349 } 350 351 //ë§ì»¤ ë°ì´í°ë¡ 그리기 352 positions.length > 0 ? drawDaumMapMarker(positions) : jQuery("#storeListUL").html("<div style='width:100%;text-align:center;margin:50px 0px;'>ê²ìë 매ì¥ì´ ììµëë¤.</div>"); 353 } 354 }) 355 //í¤ìë ê° ë¹ì¹¸ì´ë©´ 기본 ë¬¸êµ¬ë¡ ì±ìì¤ë¤ 356 jQuery("#keyword").val() == "" ? jQuery("#keyword").val( jQuery("#keyword").attr("data-val") ) : "" ; 357 jQuery("#petkeyword").val() == "" ? jQuery("#petkeyword").val( jQuery("#petkeyword").attr("data-val") ) : "" ; 358 } 359 360 361 //ë°ì´í° ë¡ë© 362 function setDaumMapMarkerPet(map, lat, lng, selectMode ){ 363 jQuery(".store_locator").addClass("on");jQuery(".store_locator").next(".cont").show(); 364 jQuery(".store_new").removeClass("on");jQuery(".store_new").next(".cont").hide(); 365 366 selectMode != "" ? mode = selectMode : mode = mode ; 367 var local = ""; 368 var local2 = ""; 369 var keyword = ""; 370 var sNo_temp = ""; 371 372 if (sNo != "" ) { 373 mode = 'search'; 374 sNo_temp = sNo; 375 sNo = ""; 376 377 } else { 378 switch(mode) { 379 case 'search' : ( 380 keyword = jQuery("#keyword").val() != jQuery("#keyword").attr("data-val") && jQuery("#keyword").val() != "" ? jQuery("#keyword").val() : "" , 381 jQuery("#storeLocal2").html(''), 382 lat = "", lng = "" 383 ); break; 384 case 'searchpet' : ( 385 keyword = jQuery("#petkeyword").val() != jQuery("#petkeyword").attr("data-val") && jQuery("#petkeyword").val() != "" ? jQuery("#petkeyword").val() : "" , 386 jQuery("#storeLocal2").html(''), 387 lat = "", lng = "" 388 ); break; 389 case 'local' : ( 390 lat = "", lng = "", 391 jQuery("#keyword").val('') , 392 local = ( jQuery("#localTitle").text() != jQuery("#localTitle").attr("data-default") && jQuery("#localTitle").text() != "" ) ? jQuery("#localTitle").text() : "", 393 local2 = ( jQuery("#localTitle2").text() != jQuery("#localTitle2").attr("data-default") && jQuery("#localTitle").text() != "" ) ? jQuery("#localTitle2").text() : "" 394 ); break; 395 case 'center' : ( 396 jQuery("#keyword").val(''), 397 ( lat == "" || lng == "" ) ? 398 ( 399 center = map.getCenter(), 400 lat = center.getLat(), lng = center.getLng() 401 ) : "" 402 ); break; 403 } 404 405// if (jQuery("#petkeyword").val() != "") { 406// keyword = jQuery("#petkeyword").val() != jQuery("#petkeyword").attr("data-val") && jQuery("#petkeyword").val() != "" ? jQuery("#petkeyword").val() : ""; 407// } 408 } 409 410 //mode == "search" ? ( keyword = jQuery("#keyword").val(), /*jQuery("#keyword").val(''),*/ lat = "", lng = "" ) : ( keyword = "", jQuery("#keyword").val(''), ( lat == "" || lng == "" ) ? ( center = map.getCenter(), lat = center.getLat(), lng = center.getLng() ) : "" ) 411 412 // mode2 - ì§ì ê²ì ì¼ë í´ë¹ ë°ì´í° ì¸ ëª¨ë ê°ì ì´ê¸°í í´ì¤ë¤ 413 //mode2 != "" ? ( mode = "search", keyword = "", lat = "", lng = "", jQuery("#keyword").val('') ) : mode = mode ; 414 415 var chk1 = jQuery("#chk1").prop("checked") ? 1 : 0 ; 416 var chk2 = jQuery("#chk2").prop("checked") ? 1 : 0 ; 417 var chk3 = jQuery("#chk3").prop("checked") ? 1 : 0 ; 418 var chk4 = jQuery("#chk4").prop("checked") ? 1 : 0 ; 419 var chk5 = jQuery("#chk5").prop("checked") ? 1 : 0 ; 420 var chk6 = jQuery("#chk6").prop("checked") ? 1 : 0 ; 421 var chk7 = jQuery("#chk7").prop("checked") ? 1 : 0 ; 422 var chk8 = jQuery("#chk8").prop("checked") ? 1 : 0 ; 423 var chk9 = jQuery("#chk9").prop("checked") ? 1 : 0 ; 424 var chk10 = jQuery("#chk10").prop("checked") ? 1 : 0 ; 425 var chk11 = jQuery("#chk11").prop("checked") ? 1 : 0 ; 426 var chk12 = jQuery("#chk12").prop("checked") ? 1 : 0 ; 427 var chk13 = jQuery("#chk13").prop("checked") ? 1 : 0 ; 428 429 jQuery.ajax({ 430 type: "GET", 431 datatype: "json", 432 data : { "lat" : lat, "lng" : lng , 433 "chk1" : chk1 , "chk2" : chk2 , "chk3" : chk3 , "chk4" : chk4 , "chk5" : chk5 , "chk6" : chk6 , "chk7" : chk7 , "chk8" : chk8 , "chk9" : chk9 , "chk10" : chk10 , "chk11" : chk11 , "chk12" : chk12 , "chk13" : chk13 ,
434 "keyword" : keyword, "StoreLocal" : local, "StoreLocal2" : local2, "storeNo" : sNo_temp }, 435 url: "petstore_data2.asp", 436 success: function (data) { 437 438 //clusterer.clear(); 439 440 //ë§ì»¤, ì¸í¬ ìëì° , 리ì¤í¸ ì´ê¸°í 441 resetDaumMap(); 442 positions = eval(data); 443 444 //ê²ì ì¼ë 첫ë²ì§¸ ììê° ì¼í°ë¡ ì¡í 445 if ( mode != "center" && positions.length > 0 ) { 446 map.setCenter( new daum.maps.LatLng(positions[0].StoreLAT, positions[0].StoreLNG) ); 447 } 448 449 //ë§ì»¤ ë°ì´í°ë¡ 그리기 450 positions.length > 0 ? drawDaumMapMarker(positions) : jQuery("#storeListUL").html("<div style='width:100%;text-align:center;margin:50px 0px;'>ê²ìë 매ì¥ì´ ììµëë¤.</div>"); 451 } 452 }) 453 //í¤ìë ê° ë¹ì¹¸ì´ë©´ 기본 ë¬¸êµ¬ë¡ ì±ìì¤ë¤ 454 jQuery("#petkeyword").val() == "" ? jQuery("#petkeyword").val( jQuery("#petkeyword").attr("data-val") ) : "" ; 455 } 456 457 //ë§ì»¤ë¥¼ ë°ì´í°ë¡ 그리기 458 function drawDaumMapMarker(positions){ 459 var imageSrc = ""; 460 461 for( var i = 0 ; i < positions.length ; i++ ){ 462 463 if (i < 60) /* #HJ 2024-05-22 ìì´ì½ ì´ë¯¸ì§ê° 70ê°ê¹ì§ë§ ìì */ 464 { 465 //ì§ë ë§ì»¤ íì ë¶ë¶ 466 var imageSize = new daum.maps.Size(40, 47); 467 var imageSrc = "/images/store/store_icon_" + positions[i].sort + ".png"; 468 // ë§ì»¤ ì´ë¯¸ì§ë¥¼ ìì±í©ëë¤ 469 var markerImage = new daum.maps.MarkerImage(imageSrc, imageSize); 470 471 // ë§ì»¤ë¥¼ ìì±í©ëë¤ 472 markers[i] = new daum.maps.Marker({ 473 map: map, // ë§ì»¤ë¥¼ íìí ì§ë 474 position: new daum.maps.LatLng(positions[i].StoreLAT, positions[i].StoreLNG), // ë§ì»¤ë¥¼ íìí ìì¹ 475 title : positions[i].StoreName, // ë§ì»¤ì íì´í, ë§ì»¤ì ë§ì°ì¤ë¥¼ ì¬ë¦¬ë©´ íì´íì´ íìë©ëë¤ 476 image : markerImage // ë§ì»¤ ì´ë¯¸ì§ 477 }); 478 } 479 else 480 { 481 //ì§ë ë§ì»¤ íì ë¶ë¶ 482 var imageSize = new daum.maps.Size(40, 47); 483 var imageSrc = "/images/store/store_icon_0.png"; 484 // ë§ì»¤ ì´ë¯¸ì§ë¥¼ ìì±í©ëë¤ 485 var markerImage = new daum.maps.MarkerImage(imageSrc, imageSize); 486 487 // ë§ì»¤ë¥¼ ìì±í©ëë¤ 488 markers[i] = new daum.maps.Marker({ 489 map: map, // ë§ì»¤ë¥¼ íìí ì§ë 490 position: new daum.maps.LatLng(positions[i].StoreLAT, positions[i].StoreLNG), // ë§ì»¤ë¥¼ íìí ìì¹ 491 title : positions[i].StoreName, // ë§ì»¤ì íì´í, ë§ì»¤ì ë§ì°ì¤ë¥¼ ì¬ë¦¬ë©´ íì´íì´ íìë©ëë¤ 492 image : markerImage // ë§ì»¤ ì´ë¯¸ì§ 493 }); 494 } 495 496 markers[i].index = i; 497 markers[i].no = positions[i].StoreNo; 498 markers[i].setMap(map); 499 500 //리ì¤í¸ íì ë¶ë¶ 501 var storeListHTML_temp = ""; 502 storeListHTML_temp = storeListHTML; 503 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreName#>/g, positions[i].StoreName ); 504 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreAddress#>/g, positions[i].StoreAddress ); 505 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreTell#>/g, positions[i].StoreTel ); 506 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreSort#>/g, positions[i].sort ); 507 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreLAT#>/g, positions[i].StoreLAT ); 508 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreLNG#>/g, positions[i].StoreLNG ); 509 storeListHTML_temp = storeListHTML_temp.replace( /<#StoreNo#>/g, positions[i].StoreNo ); 510 //storeListHTML_temp = positions[i].Distant != "" ? storeListHTML_temp.replace( /<#Distant#>/g, "(" + positions[i].Distant + " km)") : storeListHTML_temp.replace( /<#Distant#>/g, ""); 511 storeListHTML_temp = positions[i].StoreDecaffeine == 1 ? storeListHTML_temp.replace( /<#StoreDecaffeine#>/g, "<span class='decaf' title='ëì¹´íì¸'>ëì¹´íì¸</span>") : storeListHTML_temp.replace( /<#StoreDecaffeine#>/g, ""); 512 storeListHTML_temp = positions[i].StoreSoymilk == 1 ? storeListHTML_temp.replace( /<#StoreSoymilk#>/g, "<span class='soy' title='ëì '>ëì </span>") : storeListHTML_temp.replace( /<#StoreSoymilk#>/g, ""); 513 storeListHTML_temp = positions[i].StoreWifi == 1 ? storeListHTML_temp.replace( /<#StoreWifi#>/g, "<span class='wifi' title='ìì´íì´'>ìì´íì´</span>") : storeListHTML_temp.replace( /<#StoreWifi#>/g, ""); 514 storeListHTML_temp = positions[i].StoreParking == 1 ? storeListHTML_temp.replace( /<#StoreParking#>
514/g, "<span class='parking' title='주차ê°ë¥'>주차ê°ë¥</span>") : storeListHTML_temp.replace( /<#StoreParking#>/g, ""); 515 storeListHTML_temp = positions[i].Storesmoking == 1 ? storeListHTML_temp.replace( /<#Storesmoking#>/g, "<span class='smoking' title='í¡ì°ê°ë¥'>í¡ì°ê°ë¥</span>") : storeListHTML_temp.replace( /<#Storesmoking#>/g, ""); 516 storeListHTML_temp = positions[i].StoreEsmoking == 1 ? storeListHTML_temp.replace( /<#StoreEsmoking#>/g, "<span class='iqos' title='ì ìë´ë°° ì¬ì©ê°ë¥'>ì ìë´ë°° ì¬ì©ê°ë¥</span>") : storeListHTML_temp.replace( /<#StoreEsmoking#>/g, ""); 517 storeListHTML_temp = positions[i].StoreMachine == 1 ? storeListHTML_temp.replace( /<#StoreMachine#>/g, "<span class='machine' title='머ì í매'>머ì í매</span>") : storeListHTML_temp.replace( /<#StoreMachine#>/g, ""); 518 storeListHTML_temp = positions[i].StoreCapsule == 1 ? storeListHTML_temp.replace( /<#StoreCapsule#>/g, "<span class='capsule' title='캡ìí매'>캡ìí매</span>") : storeListHTML_temp.replace( /<#StoreCapsule#>/g, ""); 519 storeListHTML_temp = positions[i].StoreCake == 1 ? storeListHTML_temp.replace( /<#StoreCake#>/g, "<span class='cake' title='ì¼ìµìë ¹'>ì¼ìµìë ¹</span>") : storeListHTML_temp.replace( /<#StoreCake#>/g, ""); 520 521 storeListHTML_temp = positions[i].StoreDrive == 1 ? storeListHTML_temp.replace( /<#StoreDrive#>/g, "<span class='drive' title='ëë¼ì´ë¸ ì¤ë£¨'>ëë¼ì´ë¸ ì¤ë£¨</span>") : storeListHTML_temp.replace( /<#StoreDrive#>/g, ""); 522 storeListHTML_temp = positions[i].StoreDelivery == 1 ? storeListHTML_temp.replace( /<#StoreDelivery#>/g, "<span class='delivery' title='ë리ë²ë¦¬'>ë리ë²ë¦¬</span>") : storeListHTML_temp.replace( /<#StoreDelivery#>/g, ""); 523 storeListHTML_temp = positions[i].StorePet == 1 ? storeListHTML_temp.replace( /<#StorePet#>/g, "<span class='pet' title='ë°ë ¤ë물'>ë°ë ¤ë물</span>") : storeListHTML_temp.replace( /<#StorePet#>/g, ""); 524 storeListHTML_temp = positions[i].StoreHallCake == 1 ? storeListHTML_temp.replace( /<#StoreHallCake#>/g, "<span class='hallcake' title='íì¼ìµ'>íì¼ìµ</span>") : storeListHTML_temp.replace( /<#StoreHallCake#>/g, ""); 525 console.log(positions[i].StoreDelivery); 526 storeListHTML_temp = mode == "center" || mode == "petcenter" ? storeListHTML_temp.replace( /<#Distant#>/g, PrintComma( Math.round( positions[i].Distant * 1000 ) ) + "m" ) : storeListHTML_temp.replace( /<#Distant#>/g, "" ); 527 528 529 jQuery("#storeListUL").append(storeListHTML_temp); 530 531 //ì¤ë²ë ì´ ì¤ì ë¶ë¶ 532 var overlayContent_temp = ""; 533 overlayContent_temp = overlayContent; 534 overlayContent_temp = overlayContent_temp.replace( /<#StoreName#>/g, positions[i].StoreName ); 535 overlayContent_temp = overlayContent_temp.replace( /<#StoreAddress#>/g, positions[i].StoreAddress ); 536 overlayContent_temp = overlayContent_temp.replace( /<#StoreSort#>/g, "<img src='" + "/images/store/store_icon_" + positions[i].sort + ".png' width='80' >" ); 537 overlayContent_temp = overlayContent_temp.replace( /<#StoreLAT#>/g, positions[i].StoreLAT ); 538 overlayContent_temp = overlayContent_temp.replace( /<#StoreLNG#>/g, positions[i].StoreLNG ); 539 overlayContent_temp = overlayContent_temp.replace( /<#StoreNo#>/g, positions[i].StoreNo ); 540 overlayContent_temp = overlayContent_temp.replace( /<#StoreTell#>/g, positions[i].StoreTel ); 541 542 overlay[i] = new daum.maps.CustomOverlay({ 543 content: overlayContent_temp, 544 map: map 545 }); 546 547 daum.maps.event.addListener(markers[i], "click", function() { 548 // ì¼ë¨ ì¤ë²ë ì´ë¥¼ 모ë ë«ê³ 549 resetOverlay(); 550 551 552 //ì¼í°ë¡ ì´ë 553 map.setCenter(markers[this.index].getPosition()); 554 555 556 // í´ë¹ ì¸í¬ìë를 ì´ì´ì¤ë¤. 557 //infowindow[this.index].open(map, markers[this.index]); 558 559 //í´ë¹ ì¤ë²ë ì´ë¥¼ ì´ì´ì¤ë¤ 560 overlay[this.index].setMap(map); 561 overlay[this.index].setPosition(markers[this.index].getPosition() ); 562 }); 563 } // for( var i = 0 ; i < positions.length ; i++ ){ 564 565 //리ì¤í¸ í´ë¦ ì´ë²¤í¸ ìì±
566 jQuery("#newStoreListUL li").off("click"); 567 jQuery("#storeListUL li").off("click"); 568 jQuery("#storeListUL li").on("click",function(){ 569 // ì¼ë¨ ì¤ë²ë ì´ë¥¼ 모ë ë«ê³ 570 resetOverlay(); 571 //ì¼í°ë¡ ì´ë 572 map.setCenter(new daum.maps.LatLng(jQuery(this).attr("data-lat"), jQuery(this).attr("data-lng"))); 573 // í´ë¹ ì¸í¬ìë를 ì´ì´ì¤ë¤. 574 //infowindow[jQuery(this).index()].open(map, markers[jQuery(this).index()]); 575 //í´ë¹ ì¤ë²ë ì´ë¥¼ ì´ì´ì¤ë¤ 576 overlay[jQuery(this).index()].setMap(map); 577 overlay[jQuery(this).index()].setPosition(new daum.maps.LatLng(jQuery(this).attr("data-lat"), jQuery(this).attr("data-lng")) ); 578 }) 579 580 //í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì 581 //í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì 582// var center = map.getCenter(); 583// lat = center.getLat(); 584// lng = center.getLng() ; 585// 586// markers[i] = new daum.maps.Marker({ position: new daum.maps.LatLng( lat, lng ) }); 587// markers[i].setMap(map); 588// 589// markers[i].index = i; 590// 591// markers[i].setMap(map); 592// 593// //infowindow[i] = 594// // new daum.maps.InfoWindow({ 595// // content: '<p style="margin:7px 22px 7px 12px;font:12px/1.5 sans-serif">CENTER</p>', 596// //removable : true}); 597// 598// overlay[i] = new daum.maps.CustomOverlay({ 599// content: overlayContent, 600// map: map 601// }); 602// 603// daum.maps.event.addListener(markers[i], "click", function() { 604// // ì¼ë¨ ì¸í¬ìë를 모ë ë«ê³ 605// for ( var j = 0; j < markers.length ; j++) { 606// //infowindow[j].close(); 607// overlay[j].setMap(null); 608// } 609// //ì¼í°ë¡ ì´ë 610// map.setCenter(markers[this.index].getPosition()); 611// // í´ë¹ ì¸í¬ìë를 ì´ì´ì¤ë¤. 612// //infowindow[this.index].open(map, markers[this.index]); 613// 614// //í´ë¹ ì¤ë²ë ì´ë¥¼ ì´ì´ì¤ë¤ 615// overlay[this.index].setMap(map); 616// overlay[this.index].setPosition(markers[this.index].getPosition() ); 617// }); 618 //í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì 619 //í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì//í ì¤í¸ì© ì¼í° íì 620 621 } 622 //í¤ìëë¡ ë°ì´í° ë¡ë© 623 function searchStore(){ 624 jQuery("#keyword").val() == "" || jQuery("#keyword").val() == jQuery("#keyword").attr("data-val") ? 625 ( 626 alert("ê²ìì´ë¥¼ ì ë ¥í´ ì£¼ì¸ì") 627 ) 628 : 629 ( 630 mode = "search", 631 setDaumMapMarker(map, '', '', 'search'), 632 jQuery("#localTitle").text( jQuery("#localTitle").attr("data-default") ), 633 jQuery("#localTitle2").text( jQuery("#localTitle2").attr("data-default") ) 634 ); 635 } 636 637 //í¤ìëë¡ ë°ì´í° ë¡ë© 638 function searchPetStore(){ 639 jQuery("#petkeyword").val() == "" || jQuery("#petkeyword").val() == jQuery("#petkeyword").attr("data-val") ? 640 ( 641 alert("ê²ìì´ë¥¼ ì ë ¥í´ ì£¼ì¸ì") 642 ) 643 : 644 ( 645 mode = "searchpet", 646 setDaumMapMarkerPet(map, '', '', 'searchpet'), 647 jQuery("#localTitle").text( jQuery("#localTitle").attr("data-default") ), 648 jQuery("#localTitle2").text( jQuery("#localTitle2").attr("data-default") ) 649 ); 650 } 651 652 //ì/ë 리ì¤í¸ 653 function storeLocal() { 654 jQuery.ajax({ 655 type: "GET", 656 datatype: "json", 657 //data : { "storeNo" : no }, 658 url: "store_local_data.asp", 659 success: function (data) { 660 local = eval(data); 661 662 var localList = ""; 663 for( var i = 0 ; i < local.length ; i++ ){ 664 localList += '<li><a href="javascript:storeLocal2(\'' + local[i].StoreLocal + '\');void(0);">' + local[i].StoreLocal + '</a></li>'; 665 } 666 jQuery("#storeLocal").html(localList); 667 668 } 669 }) 670 } 671 672 //구군 리ì¤í¸ 673 function storeLocal2(local) { 674 //구군 리ì¤í¸ ì´ê¸°í í ë§µì ë¡ë© í´ì¤ë¤ 675 jQuery("#localTitle2").text( jQuery("#localTitle2").attr("data-default") ); 676 setDaumMapMarker(map, '', '', 'local' ); 677 678 jQuery.ajax({ 679 type: "GET", 680 datatype: "json", 681 data : { "storeLocal" : local }, 682 url: "store_local_data.asp", 683 success: function (data) { 684 685 local = eval(data); 686 687 var localList = ""; 688 for( var i = 0 ; i < local.length ; i++ ){ 689 localList += '<li><a href="javascript:setDaumMapMarker(map, \'\', \'\', \'local\' );void(0);">' + local[i].StoreLocal + '</a></li>'; 690 } 691 jQuery("#storeLocal2").html(localList); 692 693 } 694 }) 695 } 696 697 function newStore(){ 698 resetDaumMap();
699 var k = 0; 700 701 jQuery("#newStoreListUL li").each(function(){ 702 var obj = jQuery(this); 703 704 var data_name = obj.attr("data-name"); 705 var data_addr = obj.attr("data-addr"); 706 var data_sort = obj.attr("data-sort"); 707 var data_lat = obj.attr("data-lat"); 708 var data_lng = obj.attr("data-lng"); 709 var data_no = obj.attr("data-no"); 710 var data_tel = obj.attr("data-tel"); 711 712 if ( k == 0 ) { 713 map.setCenter( new daum.maps.LatLng(data_lat, data_lng) ); 714 } 715 716 //ì§ë ë§ì»¤ íì ë¶ë¶ 717 var imageSize = new daum.maps.Size(40, 47); 718 var imageSrc = "/images/store/store_icon_" + data_sort + ".png"; 719 // ë§ì»¤ ì´ë¯¸ì§ë¥¼ ìì±í©ëë¤ 720 var markerImage = new daum.maps.MarkerImage(imageSrc, imageSize); 721 722 // ë§ì»¤ë¥¼ ìì±í©ëë¤ 723 markers[k] = new daum.maps.Marker({ 724 map: map, // ë§ì»¤ë¥¼ íìí ì§ë 725 position: new daum.maps.LatLng(data_lat, data_lng), // ë§ì»¤ë¥¼ íìí ìì¹ 726 title : data_name, // ë§ì»¤ì íì´í, ë§ì»¤ì ë§ì°ì¤ë¥¼ ì¬ë¦¬ë©´ íì´íì´ íìë©ëë¤ 727 image : markerImage // ë§ì»¤ ì´ë¯¸ì§ 728 }); 729 730 markers[k].index = k; 731 markers[k].no = data_no 732 markers[k].setMap(map); 733 734 //ì¤ë²ë ì´ ì¤ì ë¶ë¶ 735 var overlayContent_temp = ""; 736 overlayContent_temp = overlayContent; 737 overlayContent_temp = overlayContent_temp.replace( /<#StoreName#>/g, data_name ); 738 overlayContent_temp = overlayContent_temp.replace( /<#StoreAddress#>/g, data_addr ); 739 overlayContent_temp = overlayContent_temp.replace( /<#StoreSort#>/g, "<img src='" + "/images/store/store_icon_" + k + ".png' width='80' >" ); 740 overlayContent_temp = overlayContent_temp.replace( /<#StoreLAT#>/g, data_lat ); 741 overlayContent_temp = overlayContent_temp.replace( /<#StoreLNG#>/g, data_lng ); 742 overlayContent_temp = overlayContent_temp.replace( /<#StoreNo#>/g, data_no ); 743 overlayContent_temp = overlayContent_temp.replace( /<#StoreTell#>/g, data_tel ); 744 745 overlay[k] = new daum.maps.CustomOverlay({ 746 content: overlayContent_temp, 747 map: map 748 }); 749 750 daum.maps.event.addListener(markers[k], "click", function() { 751 // ì¼ë¨ ì¤ë²ë ì´ë¥¼ 모ë ë«ê³ 752 resetOverlay(); 753 //ì¼í°ë¡ ì´ë 754 map.setCenter(markers[this.index].getPosition()); 755 // í´ë¹ ì¸í¬ìë를 ì´ì´ì¤ë¤. 756 //infowindow[this.index].open(map, markers[this.index]); 757 758 //í´ë¹ ì¤ë²ë ì´ë¥¼ ì´ì´ì¤ë¤ 759 overlay[this.index].setMap(map); 760 overlay[this.index].setPosition(markers[this.index].getPosition() ); 761 }); 762 k++; 763 764 }) 765 //리ì¤í¸ í´ë¦ ì´ë²¤í¸ ìì± 766 jQuery("#storeListUL li").off("click"); 767 jQuery("#newStoreListUL li").off("click"); 768 jQuery("#newStoreListUL li").on("click",function(){ 769 // ì¼ë¨ ì¤ë²ë ì´ë¥¼ 모ë ë«ê³ 770 resetOverlay(); 771 //ì¼í°ë¡ ì´ë 772 map.setCenter(new daum.maps.LatLng(jQuery(this).attr("data-lat"), jQuery(this).attr("data-lng"))); 773 // í´ë¹ ì¸í¬ìë를 ì´ì´ì¤ë¤. 774 //infowindow[jQuery(this).index()].open(map, markers[jQuery(this).index()]); 775 //í´ë¹ ì¤ë²ë ì´ë¥¼ ì´ì´ì¤ë¤ 776 overlay[jQuery(this).index()].setMap(map); 777 overlay[jQuery(this).index()].setPosition(new daum.maps.LatLng(jQuery(this).attr("data-lat"), jQuery(this).attr("data-lng")) ); 778 }) 779 780 } 781 782 783 784
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.