{"id":11959,"date":"2022-01-23T10:44:30","date_gmt":"2022-01-23T01:44:30","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=11959"},"modified":"2022-09-20T09:07:26","modified_gmt":"2022-09-20T00:07:26","slug":"gwc-ui-library-searchinput","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=11959","title":{"rendered":"#GWC UI Library : SearchInput"},"content":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 SearchInput \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<p>\uba3c\uc800 DOM \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">\r\n<div class=\"center\">\r\n    <gwc-search-input id=\"input\"><\/gwc-search-input>\r\n<\/div>\r\n<\/pre>\n<p>\uadf8\ub9ac\uace0 CSS \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uad6c\uc694.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\">\r\n.center {\r\n    display: flex;\r\n    width: 100%;\r\n    height: 100%;\r\n    justify-content: center;\r\n    align-items: center;\r\n}\r\n\r\n.input {\r\n    width: 25em; \/* \ud3ec\ucee4\uc2a4\ub97c \ubc1b\uc73c\uba74 \ucee4\uc9c0\ub294 \ud06c\uae30 *\/\r\n}\r\n<\/pre>\n<p>js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\r\nwindow.onload = () => {\r\n    input.addEventListener(\"enter\", () => {\r\n        const v = input.value;\r\n\r\n        gwcMessage(`\"${v}\"(\uc73c)\ub85c \uac80\uc0c9\uc744 \uc218\ud589\ud569\ub2c8\ub2e4.`);\r\n        \r\n        input.addHistory(v);\r\n    });\r\n\r\n    GeoServiceWebComponentManager.instance.update();\r\n};\r\n<\/pre>\n<p>\uc2e4\ud589 \uacb0\uacfc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><center><video controls=\"controls\" ><source src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/01\/gwc-searchinput.mp4\" \/>\ube44\ub514\uc624\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uc6f9\ube0c\ub77c\uc6b0\uc838\uc785\ub2c8\ub2e4.<\/video><\/center><\/p>\n<p>\uc774 \ucef4\ud3ec\ub10c\ud2b8\ub294 \uc0ac\uc6a9\uc790\uac00 \ud074\ub9ad\ud560 \ub54c \uc785\ub825\uc774 \ud65c\uc131\ud654\ub418\ub294\ub370\uc694. \ud56d\uc0c1 \ud65c\uc131\ud654\ub418\ub3c4\ub85d \ud558\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c\ucc98\ub7fc always-open \uc18d\uc131\uc744 &#8220;true&#8221;\ub85c \uc9c0\uc815\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">\r\n<gwc-search-input id=\"input\" always-open=\"true\"><\/gwc-search-input>\r\n<\/pre>\n<p>\uc774 \ucef4\ud3ec\ub10c\ud2b8\ub294 \ud0a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud558\ub2e4\uac00 \ud3ec\ucee4\uc2a4\ub97c \uc783\uc5b4\ubc84\ub9ac\uba74 \uc785\ub825\ucc3d\uc774 \ub2eb\ud788\uac8c \ub418\ub294\ub370 \uc774\ub54c close \uc774\ubca4\ud2b8\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc0c1\ub300\uc801\uc778 \uc774\ubca4\ud2b8\ub85c open \uc774\ubca4\ud2b8\ub294 \uc785\ub825\ucc3d\uc774 \uc5f4\ub9b4\ub54c \ud638\ucd9c\ub429\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 SearchInput \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4. \uba3c\uc800 DOM \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \uadf8\ub9ac\uace0 CSS \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uad6c\uc694. .center { display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; } .input { width: 25em; \/* \ud3ec\ucee4\uc2a4\ub97c \ubc1b\uc73c\uba74 \ucee4\uc9c0\ub294 \ud06c\uae30 *\/ } js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. window.onload = () => { input.addEventListener(&#8220;enter&#8221;, () &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=11959\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;#GWC UI Library : SearchInput&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140],"tags":[],"class_list":["post-11959","post","type-post","status-publish","format-standard","hentry","category-gwc"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/11959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11959"}],"version-history":[{"count":6,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/11959\/revisions"}],"predecessor-version":[{"id":12121,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/11959\/revisions\/12121"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11959"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}