From d5fecd0388be706d1b693232715c6db6bc5c3dc0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 10:59:11 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EC=83=88=20=EC=A7=80=EB=8F=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=84=B0=EC=B9=98=EC=8A=A4=ED=81=AC=EB=A6=B0?= =?UTF-8?q?=EC=97=90=EC=84=9C=201=ED=84=B0=EC=B9=98=20->=20tooltip,=202?= =?UTF-8?q?=ED=84=B0=EC=B9=98=20->=20=ED=81=B4=EB=A6=AD=20=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.js | 59 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/tmp_map/map.js b/tmp_map/map.js index fb7cd447..b2a67b0c 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -159,7 +159,6 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) city.nation = nationObj.name; city.color = nationObj.color; city.isCapital = (nationObj.capital == city.id); - console.log(city.id, nationObj.capital, city.isCapital); return city; } @@ -268,24 +267,68 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) var $map_body = $('.world_map .map_body'); + $objs.bind('touchstart', function(e){ + var $this = $(this); + + var touchMode = $this.data('touchMode'); + if($tooltip_city.data('target') != $this.data('id')){ + $this.data('touchMode', 1); + } + else if(touchMode === undefined){ + $this.data('touchMode', 1); + } + else{ + $this.data('touchMode', touchMode + 1); + } - $map_body.mousemove(function(e){ + $tooltip_city.data('target', $this.data('id')) + + }); + + $map_body.bind('mousemove', function(e){ var parentOffset = $map_body.offset(); var relX = e.pageX - parentOffset.left; var relY = e.pageY - parentOffset.top; $tooltip.css({'top': relY + 10, 'left': relX + 10}); }); - $objs.hover(function(event){ - var $city = $(this); - $tooltip_city.html($city.data('text')); - $tooltip_nation.html($city.data('nation')); + $objs.bind('mouseenter touchend', function(e){ + var $this = $(this); + + $tooltip_city.html($this.data('text')); + $tooltip_nation.html($this.data('nation')); + $tooltip_city.data('target', $this.data('id')); $tooltip.show(); - },function(event){ + return false; + }); + + $map_body.bind('touchend',function(e){ + //위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치 $tooltip.hide(); }); + $objs.bind('mouseleave', function(event){ + $tooltip.hide(); + }); + + $objs.bind('click', function(){ + //touch의 경우 첫 터치는 tooltip을 보여주고, 두번째는 클릭 + var $this = $(this); + var touchMode = $this.data('touchMode'); + + if(touchMode === undefined){ + return true; + } + + if(touchMode === 1){ + return false; + } + $this.data('touchMode', 1); + return true; + }); + + return obj; } @@ -337,7 +380,7 @@ $(function(){ function tmp(a){ console.log(a); - return false; + //return false; } reloadWorldMap(isDetailMap, clickableAll, tmp, 'goCity.php?id={0}'); From 907b490747b489bdd4a570c13a51444f6eda4a5a Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 11:49:36 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EC=83=88=20=EC=A7=80=EB=8F=84=20=ED=84=B0?= =?UTF-8?q?=EC=B9=98=EC=8A=A4=ED=81=AC=EB=A6=B0=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.js | 64 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/tmp_map/map.js b/tmp_map/map.js index b2a67b0c..c54759cc 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -267,7 +267,10 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) var $map_body = $('.world_map .map_body'); + //터치스크린 탭 + $objs.bind('touchstart', function(e){ + console.log('touchstart'); var $this = $(this); var touchMode = $this.data('touchMode'); @@ -280,26 +283,21 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) else{ $this.data('touchMode', touchMode + 1); } + $map_body.data('touchMode', 1); - $tooltip_city.data('target', $this.data('id')) + $tooltip_city.data('target', $this.data('id')); + }); - - $map_body.bind('mousemove', function(e){ - var parentOffset = $map_body.offset(); - var relX = e.pageX - parentOffset.left; - var relY = e.pageY - parentOffset.top; - - $tooltip.css({'top': relY + 10, 'left': relX + 10}); - }); - - $objs.bind('mouseenter touchend', function(e){ + + $objs.bind('touchend', function(e){ + console.log('touchend'); var $this = $(this); - + var position = $this.parent().position(); + console.log(position); $tooltip_city.html($this.data('text')); $tooltip_nation.html($this.data('nation')); - $tooltip_city.data('target', $this.data('id')); - $tooltip.show(); + $tooltip.css({'top': position.top + 25, 'left': position.left + 35}).show(); return false; }); @@ -308,10 +306,6 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $tooltip.hide(); }); - $objs.bind('mouseleave', function(event){ - $tooltip.hide(); - }); - $objs.bind('click', function(){ //touch의 경우 첫 터치는 tooltip을 보여주고, 두번째는 클릭 var $this = $(this); @@ -328,6 +322,40 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) return true; }); + //Mouse over 모드 작동 + + $map_body.bind('mousemove', function(e){ + if($(this).data('touchMode')){ + return true; + } + + var parentOffset = $map_body.offset(); + var relX = e.pageX - parentOffset.left; + var relY = e.pageY - parentOffset.top; + + $tooltip.css({'top': relY + 10, 'left': relX + 10}); + }); + + $objs.bind('mouseenter', function(e){ + console.log('mouseenter'); + var $this = $(this); + //mouseenter는 터치에서는 없는 마우스 고유 기능임. + $this.removeData('touchMode'); + $map_body.removeData('touchMode'); + + $tooltip_city.data('target', $this.data('id')); + $tooltip_city.html($this.data('text')); + $tooltip_nation.html($this.data('nation')); + + $tooltip.show(); + }); + + $objs.bind('mouseleave', function(event){ + $tooltip.hide(); + }); + + + return obj; } From 8f3c4ded62e95955d2cdb3edbb9d6bca7fad084c Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 14:10:51 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=EC=83=88=EC=A7=80=EB=8F=84=EC=97=90?= =?UTF-8?q?=EC=84=9C=20touchend=EC=99=80=20click=EC=9D=B4=20=EB=8F=99?= =?UTF-8?q?=EC=8B=9C=EC=97=90=20=EB=B0=9C=EC=83=9D=ED=95=A0=EB=95=8C=20?= =?UTF-8?q?=EC=83=9D=EA=B8=B0=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.js | 62 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/tmp_map/map.js b/tmp_map/map.js index c54759cc..4d649cf4 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -268,9 +268,8 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) var $map_body = $('.world_map .map_body'); //터치스크린 탭 - - $objs.bind('touchstart', function(e){ - console.log('touchstart'); + + $objs.on('touchstart', function(e){ var $this = $(this); var touchMode = $this.data('touchMode'); @@ -290,41 +289,31 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) }); - $objs.bind('touchend', function(e){ - console.log('touchend'); + $objs.on('touchend', function(e){ var $this = $(this); var position = $this.parent().position(); - console.log(position); $tooltip_city.html($this.data('text')); $tooltip_nation.html($this.data('nation')); $tooltip.css({'top': position.top + 25, 'left': position.left + 35}).show(); - return false; + + var touchMode = $this.data('touchMode'); + if(touchMode <= 1){ + return false; + } + + //xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다. + $this.data('touchMode', 0); }); - $map_body.bind('touchend',function(e){ + $map_body.on('touchend',function(e){ + //위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치 $tooltip.hide(); }); - $objs.bind('click', function(){ - //touch의 경우 첫 터치는 tooltip을 보여주고, 두번째는 클릭 - var $this = $(this); - var touchMode = $this.data('touchMode'); - - if(touchMode === undefined){ - return true; - } - - if(touchMode === 1){ - return false; - } - $this.data('touchMode', 1); - return true; - }); - //Mouse over 모드 작동 - $map_body.bind('mousemove', function(e){ + $map_body.on('mousemove', function(e){ if($(this).data('touchMode')){ return true; } @@ -336,12 +325,13 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $tooltip.css({'top': relY + 10, 'left': relX + 10}); }); - $objs.bind('mouseenter', function(e){ + $objs.on('mouseenter', function(e){ + if($map_body.data('touchMode')){ + return true; + } console.log('mouseenter'); + var $this = $(this); - //mouseenter는 터치에서는 없는 마우스 고유 기능임. - $this.removeData('touchMode'); - $map_body.removeData('touchMode'); $tooltip_city.data('target', $this.data('id')); $tooltip_city.html($this.data('text')); @@ -350,11 +340,21 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $tooltip.show(); }); - $objs.bind('mouseleave', function(event){ + $objs.on('mouseleave', function(event){ $tooltip.hide(); }); - + $objs.on('click', function(e){ + //xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다. + var touchMode = $(this).data('touchMode'); + if(touchMode === undefined){ + return; + } + + if(touchMode === 1){ + return false; + } + }); return obj; From 54c7bf3a046b7d2690a86aaaaab619d295a101f5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 14:12:34 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=EC=83=88=20=EC=A7=80=EB=8F=84=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EB=A5=BC=20=EC=9C=84=ED=95=9C=20goCity.php?= =?UTF-8?q?=20=EC=98=88=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/goCity.php | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tmp_map/goCity.php diff --git a/tmp_map/goCity.php b/tmp_map/goCity.php new file mode 100644 index 00000000..bbe1e1ba --- /dev/null +++ b/tmp_map/goCity.php @@ -0,0 +1,2 @@ +goCity.php, cityId is + From 9efb83323af1d773afd70f2fe2511acd737dedcb Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 15:38:06 +0900 Subject: [PATCH 5/7] =?UTF-8?q?=EB=82=B4=20=EB=8F=84=EC=8B=9C=20=EA=B0=95?= =?UTF-8?q?=EC=A1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.css | 1 - tmp_map/map.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tmp_map/map.css b/tmp_map/map.css index 1dd280bb..dda721a7 100644 --- a/tmp_map/map.css +++ b/tmp_map/map.css @@ -101,7 +101,6 @@ } .world_map .my_city{ - border:solid 0.02em red;/* Always 1px :) */ outline:dotted 3px red; } diff --git a/tmp_map/map.js b/tmp_map/map.js index 4d649cf4..6d12ce52 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -250,6 +250,8 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) }); + + $world_map.find('.city_base_{0} .city_img'.format(myCity)).addClass('my_city'); return obj; } From 13520093504495c5f7b27a56b40f1d555f5e7c4c Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 17:24:45 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=EB=8B=A8=EC=88=9C=20=EB=AA=A8=EB=93=9C?= =?UTF-8?q?=EB=8F=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.css | 168 +++++++++++++++++++++++++++++++++++++------- tmp_map/map.html | 2 +- tmp_map/map.js | 69 ++++++++++++++++-- tmp_map/result.json | 6 +- 4 files changed, 212 insertions(+), 33 deletions(-) diff --git a/tmp_map/map.css b/tmp_map/map.css index dda721a7..10ed27c5 100644 --- a/tmp_map/map.css +++ b/tmp_map/map.css @@ -100,10 +100,22 @@ height:12px; } -.world_map .my_city{ - outline:dotted 3px red; +.world_map.map_detail .my_city{ + border:solid 1px red; + outline:dotted 4px red; } + +.world_map.map_detail .city_filler{ + position:absolute; + width:100%; + height:100%; + left:-1px; + top:-1px; + background:transparent; +} + + .city_base{ position:absolute; width:40px; @@ -208,7 +220,7 @@ } /* -.city_base.city_level_{0} .city_img{ +.map_detail .city_base.city_level_{0} .city_img{ //$img = loadImg('/images/cast_{0}.gif'); //$parent = cssSelect('.city_base'); width: $img.width; @@ -217,120 +229,122 @@ top: ($parent.height - $img.height)/2; } */ -.city_base.city_level_1 .city_img{ + + +.map_detail .city_base.city_level_1 .city_img{ width:16px; height:15px; left:12px; top:7.5px; } -.city_base.city_level_2 .city_img{ +.map_detail .city_base.city_level_2 .city_img{ width:20px; height:14px; left:10px; top:8px; } -.city_base.city_level_3 .city_img{ +.map_detail .city_base.city_level_3 .city_img{ width:14px; height:14px; left:13px; top:8px; } -.city_base.city_level_4 .city_img{ +.map_detail .city_base.city_level_4 .city_img{ width:20px; height:15px; left:10px; top:7.5px; } -.city_base.city_level_5 .city_img{ +.map_detail .city_base.city_level_5 .city_img{ width:24px; height:16px; left:8px; top:7px; } -.city_base.city_level_6 .city_img{ +.map_detail .city_base.city_level_6 .city_img{ width:26px; height:18px; left:7px; top:6px; } -.city_base.city_level_7 .city_img{ +.map_detail .city_base.city_level_7 .city_img{ width:28px; height:20px; left:6px; top:5px; } -.city_base.city_level_8 .city_img{ +.map_detail .city_base.city_level_8 .city_img{ width:32px; height:24px; left:4px; top:3px; } -.city_base .city_state{ +.map_detail .city_base .city_state{ position: absolute; top:5px; /*TODO:도시 레벨 별로 다르게 위치 설정해볼 것*/ left:0; } -.city_base .city_flag{ +.map_detail .city_base .city_flag{ position: absolute; width:12px; height:12px; } -.city_base .city_flag > img{ +.map_detail .city_base .city_flag > img{ width:12px; height:12px; } -.city_base.city_level_1 .city_flag{ +.map_detail .city_base.city_level_1 .city_flag{ right:-8px; top:-4px; } -.city_base.city_level_2 .city_flag{ +.map_detail .city_base.city_level_2 .city_flag{ right:-8px; top:-4px; } -.city_base.city_level_3 .city_flag{ +.map_detail .city_base.city_level_3 .city_flag{ right:-8px; top:-4px; } -.city_base.city_level_4 .city_flag{ +.map_detail .city_base.city_level_4 .city_flag{ right:-6px; top:-3px; } -.city_base.city_level_5 .city_flag{ +.map_detail .city_base.city_level_5 .city_flag{ right:-6px; top:-4px; } -.city_base.city_level_6 .city_flag{ +.map_detail .city_base.city_level_6 .city_flag{ right:-6px; top:-4px; } -.city_base.city_level_7 .city_flag{ +.map_detail .city_base.city_level_7 .city_flag{ right:-6px; top:-4px; } -.city_base.city_level_8 .city_flag{ +.map_detail .city_base.city_level_8 .city_flag{ right:-6px; top:-3px; } -.city_base .city_flag .city_capital{ +.map_detail .city_base .city_flag .city_capital{ position: absolute; width:10px; height:10px; @@ -338,7 +352,113 @@ right:-1px; } -.city_base .city_flag .city_capital > img{ +.map_detail .city_base .city_flag .city_capital > img{ width:10px; height:10px; +} + +/* Basic */ + +.world_map.map_basic .city_filler{ + position:absolute; + width:100%; + height:100%; + left:0; + top:0; + background:transparent; +} + +.world_map.map_basic .my_city{ + outline:dotted 4px red; +} + +.map_basic .city_base .city_img{ + background-color:white; +} + +.map_basic .city_base.city_level_1 .city_img{ + width:12px; + height:12px; + left:14px; + top:9px; +} + +.map_basic .city_base.city_level_2 .city_img{ + width:12px; + height:12px; + left:14px; + top:9px; +} + +.map_basic .city_base.city_level_3 .city_img{ + width:14px; + height:14px; + left:13px; + top:8px; +} + +.map_basic .city_base.city_level_4 .city_img{ + width:16px; + height:14px; + left:12px; + top:8px; +} + +.map_basic .city_base.city_level_5 .city_img{ + width:18px; + height:16px; + left:11px; + top:7px; +} + +.map_basic .city_base.city_level_6 .city_img{ + width:20px; + height:16px; + left:10px; + top:7px; +} + +.map_basic .city_base.city_level_7 .city_img{ + width:22px; + height:18px; + left:9px; + top:6px; +} + +.map_basic .city_base.city_level_8 .city_img{ + width:24px; + height:18px; + left:8px; + top:6px; +} + + +.map_basic .city_base .city_capital{ + position: absolute; + width:5px; + height:5px; + top:-2px; + right:-2px; + background-color:yellow; +} + +.map_basic .city_base .city_state{ + position: absolute; + width:10px; + height:10px; + top:-2px; + left:-4px; + background-color:white; +} + +.map_basic .city_base .city_state.city_state_war{ + background-color:red; +} + +.map_basic .city_base .city_state.city_state_bad{ + background-color:orange; +} + +.map_basic .city_base .city_state.city_state_good{ + background-color:blue; } \ No newline at end of file diff --git a/tmp_map/map.html b/tmp_map/map.html index 6d447853..0109d556 100644 --- a/tmp_map/map.html +++ b/tmp_map/map.html @@ -12,7 +12,7 @@ -
+
diff --git a/tmp_map/map.js b/tmp_map/map.js index 6d12ce52..f6170fb3 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -22,6 +22,12 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) var year = obj.year; var month = obj.month; + if(isDetailMap){ + $world_map.addClass('map_detail').removeClass('map_basic'); + } + else{ + $world_map.addClass('map_basic').removeClass('map_detail'); + } var $map_title = $('.map_title_text'); if(year < startYear + 1){ @@ -224,7 +230,7 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $linkObj.data({'text':city.text,'nation':city.nation,'id':city.id}); $cityObj.append($linkObj); - var $imgObj = $('
'.format(city.level)); + var $imgObj = $('
'.format(city.level)); $linkObj.append($imgObj); @@ -243,20 +249,73 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) } $imgObj.append($flagObj); } - - + $map_body.append($cityObj); }); - $world_map.find('.city_base_{0} .city_img'.format(myCity)).addClass('my_city'); + $world_map.find('.city_base_{0} .city_filler'.format(myCity)).addClass('my_city'); return obj; } function drawBasicWorldMap(obj){ + + var $map_body = $('.world_map .map_body'); + + var cityList = obj.cityList; + var myCity = obj.myCity; + + cityList.forEach(function(city){ + var id = city.id; + $('.city_base_{0}'.format(id)).detach(); + //이전 도시는 지운다. + + var $cityObj = $('
'.format(id)); + $cityObj.addClass('city_level_{0}'.format(city.level)); + $cityObj.data('obj', city).css({'left':city.x-20,'top':city.y-15}); + + var $linkObj = $(''); + $linkObj.data({'text':city.text,'nation':city.nation,'id':city.id}); + $cityObj.append($linkObj); + + var $imgObj = $('
'); + if('color' in city && city.color !== null){ + $imgObj.css({'background-color':city.color}); + } + $linkObj.append($imgObj); + + if(city.state > 0){ + console.log(city.state); + var state_text = 'wrong'; + if(city.state < 10){ + state_text = 'good'; + } + else if(city.state < 40){ + state_text = 'bad'; + } + else if(city.state < 50){ + state_text = 'war'; + } + + var $stateObj = $('
'.format(state_text)); + $imgObj.append($stateObj); + } + + //단순 표기에서는 깃발 여부가 없음 + if(city.isCapital){ + var $capitalObj = $('
'); + $imgObj.append($capitalObj); + } + + + $map_body.append($cityObj); + }); + + $world_map.find('.city_base_{0} .city_filler'.format(myCity)).addClass('my_city'); + return obj; } @@ -405,7 +464,7 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $(function(){ - var isDetailMap = true; + var isDetailMap = false; var clickableAll = false; function tmp(a){ diff --git a/tmp_map/result.json b/tmp_map/result.json index 69d18f31..9c4e8d62 100644 --- a/tmp_map/result.json +++ b/tmp_map/result.json @@ -16,7 +16,7 @@ [10, 7, 0, 0, 2, 1], [11, 7, 0, 0, 2, 1], [12, 7, 0, 0, 2, 1], - [13, 7, 0, 1, 6, 1], + [13, 7, 43, 1, 6, 1], [14, 7, 0, 1, 6, 0], [15, 7, 0, 1, 7, 1], [16, 7, 0, 1, 8, 1], @@ -105,7 +105,7 @@ [3,"오","#ff0000",89] ], "spyList":[133, 892], - "shownByGeneralList":[65,33,73], - "myCity":83, + "shownByGeneralList":[3, 65,33,73], + "myCity":3, "myNation":2 } \ No newline at end of file From fd8ab0e4b0165b8ea13b39705ea58b0b76d4f7e9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 31 Jan 2018 17:32:49 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=EC=83=88=20=EC=A7=80=EB=8F=84=20map.html?= =?UTF-8?q?=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=BD=94=EB=93=9C=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0,=20=EC=8B=A4=EC=A0=9C=20=EB=8D=B0=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EC=8B=9D=20=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tmp_map/map.html | 35 +++++++++++++++++++++++++++++++++++ tmp_map/map.js | 16 +--------------- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/tmp_map/map.html b/tmp_map/map.html index 0109d556..d4071195 100644 --- a/tmp_map/map.html +++ b/tmp_map/map.html @@ -10,6 +10,41 @@ + +
diff --git a/tmp_map/map.js b/tmp_map/map.js index f6170fb3..93bca7f3 100644 --- a/tmp_map/map.js +++ b/tmp_map/map.js @@ -14,7 +14,7 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) var cityPosition = getCityPosition(); - //OBJ : startYear, year, month, cityList, nationList, spyList, ourCityList, shownByGeneralList, myCity + //OBJ : startYear, year, month, cityList, nationList, spyList, shownByGeneralList, myCity var $world_map = $('.world_map'); function setMapBackground(obj){ @@ -288,7 +288,6 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) $linkObj.append($imgObj); if(city.state > 0){ - console.log(city.state); var state_text = 'wrong'; if(city.state < 10){ state_text = 'good'; @@ -390,7 +389,6 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) if($map_body.data('touchMode')){ return true; } - console.log('mouseenter'); var $this = $(this); @@ -462,15 +460,3 @@ function reloadWorldMap(isDetailMap, clickableAll, selectCallback, hrefTemplate) .then(saveCityInfo); } -$(function(){ - - var isDetailMap = false; - var clickableAll = false; - - function tmp(a){ - console.log(a); - //return false; - } - reloadWorldMap(isDetailMap, clickableAll, tmp, 'goCity.php?id={0}'); - -}); \ No newline at end of file