diff --git a/tmp_map/base_map.js b/tmp_map/base_map.js index 760911be..6ce82a0a 100644 --- a/tmp_map/base_map.js +++ b/tmp_map/base_map.js @@ -1,3 +1,25 @@ +function convColorValue(color){ + if(color.startsWith('#')){ + color = color.substr(1); + } + color = color.toUpperCase(); + + var colorBase = new Set([ + '000080', '0000FF', '008000', '008080', '00BFFF', '00FF00', '00FFFF', '20B2AA', + '2E8B57', '483D8B', '6495ED', '7B68EE', '7CFC00', '7FFFD4', '800000', '800080', + '808000', '87CEEB', 'A0522D', 'A9A9A9', 'AFEEEE', 'BA55D3', 'E0FFFF', 'F5F5DC', + 'FF0000', 'FF00FF', 'FF6347', 'FFA500', 'FFC0CB', 'FFD700', 'FFDAB9', 'FFFF00', + 'FFFFFF' + ]); + + if(!colorBase.has(color)){ + return '000000'; + } + + return color; + +} + function getCityPosition(){ return { 1: ["업", 345, 130], diff --git a/tmp_map/map.css b/tmp_map/map.css index 8f4963f4..57946321 100644 --- a/tmp_map/map.css +++ b/tmp_map/map.css @@ -103,3 +103,101 @@ border:solid 0.02em red;/* Always 1px :) */ outline:dotted 3px red; } + +.city_base{ + position:absolute; + width:40px; + height:30px; + margin-left:-20px; + margin-top:-10px; +} + +.city_base .city_bg{ + position:absolute; + left:10px; + top:20px; + background-position: center; +} + +.map_detail .city_base.city_level_1 .city_bg{ + /*수*/ + width:48px; + height:45px; + background-size:48px 45px; + margin-top:-24px; + margin-left:-22.5px; +} + +.map_detail .city_base.city_level_2 .city_bg{ + /*진*/ + width:60px; + height:42px; + background-size:60px 42px; + margin-top:-30px; + margin-left:-21px; +} + +.map_detail .city_base.city_level_3 .city_bg{ + /*관*/ + width:42px; + height:42px; + background-size:42px 42px; + margin-top:-21px; + margin-left:-21px; +} + +.map_detail .city_base.city_level_4 .city_bg{ + /*이*/ + width:60px; + height:45px; + background-size:60px 45px; + margin-top:-30px; + margin-left:-22.5px; +} + +.map_detail .city_base.city_level_5 .city_bg{ + /*소*/ + width:72px; + height:48px; + background-size:72px 48px; + margin-top:-36px; + margin-left:-24px; +} + +.map_detail .city_base.city_level_6 .city_bg{ + /*중*/ + width:78px; + height:54px; + background-size:78px 54px; + margin-top:-39px; + margin-left:-27px; +} + +.map_detail .city_base.city_level_7 .city_bg{ + /*대*/ + width:84px; + height:60px; + background-size:84px 60px; + margin-top:-42px; + margin-left:-30px; +} + +.map_detail .city_base.city_level_8 .city_bg{ + /*특*/ + width:96px; + height:72px; + background-size:96px 72px; + margin-top:-48px; + margin-left:-36px; +} + +.city_img{ + display: table-cell; + position:absolute; + /*line-height:30px;*/ + vertical-align: middle; + width:40px; + height:30px; + text-align:center; + align-items: center; +} \ No newline at end of file diff --git a/tmp_map/map.html b/tmp_map/map.html index 9ffcd0d5..a521a94d 100644 --- a/tmp_map/map.html +++ b/tmp_map/map.html @@ -18,7 +18,6 @@
