|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | + <!-- |
| 5 | + If you are serving your web app in a path other than the root, change the |
| 6 | + href value below to reflect the base path you are serving from. |
| 7 | +
|
| 8 | + The path provided below has to start and end with a slash "/" in order for |
| 9 | + it to work correctly. |
| 10 | +
|
| 11 | + Fore more details: |
| 12 | + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base |
| 13 | + --> |
| 14 | + <base href="/"> |
| 15 | + |
| 16 | + <meta charset="UTF-8"> |
| 17 | + <meta content="IE=Edge" http-equiv="X-UA-Compatible"> |
| 18 | + <meta name="description" content="A new Flutter project."> |
| 19 | + |
| 20 | + <!-- iOS meta tags & icons --> |
| 21 | + <meta name="apple-mobile-web-app-capable" content="yes"> |
| 22 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
| 23 | + <meta name="apple-mobile-web-app-title" content="eventsf"> |
| 24 | + <link rel="apple-touch-icon" href="icons/Icon-192.png"> |
| 25 | + |
| 26 | + <!-- Favicon --> |
| 27 | + <link rel="icon" type="image/png" href="favicon.png"/> |
| 28 | + |
| 29 | + <title>eventsf</title> |
| 30 | + <link rel="manifest" href="manifest.json"> |
| 31 | +</head> |
| 32 | +<body> |
| 33 | +<div id="layer" style="display:none;position:fixed;overflow:hidden;z-index:1;-webkit-overflow-scrolling:touch;"></div> |
| 34 | + <!-- This script installs service_worker.js to provide PWA functionality to |
| 35 | + application. For more information, see: |
| 36 | + https://developers.google.com/web/fundamentals/primers/service-workers --> |
| 37 | + <script> |
| 38 | + if ('serviceWorker' in navigator) { |
| 39 | + window.addEventListener('flutter-first-frame', function () { |
| 40 | + navigator.serviceWorker.register('flutter_service_worker.js'); |
| 41 | + }); |
| 42 | + } |
| 43 | + </script> |
| 44 | + <script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script> |
| 45 | + <script> |
| 46 | + window.add = {}; |
| 47 | + var element_layer = document.getElementById('layer'); |
| 48 | + function aa(){ |
| 49 | + // return new daum.Postcode({ |
| 50 | + // oncomplete: function(data) { |
| 51 | + // // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분입니다. |
| 52 | + // // 예제를 참고하여 다양한 활용법을 확인해 보세요. |
| 53 | + // add.data = data.address; |
| 54 | + // console.log(data); |
| 55 | + // return data; |
| 56 | + // } |
| 57 | + // }).open(); |
| 58 | + new daum.Postcode({ |
| 59 | + oncomplete: function(data) { |
| 60 | + // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분입니다. |
| 61 | + // 예제를 참고하여 다양한 활용법을 확인해 보세요. |
| 62 | + add.data = data.address; |
| 63 | + console.log(data); |
| 64 | + element_layer.style.zIndex = 0; |
| 65 | + element_layer.style.display="none"; |
| 66 | + return data; |
| 67 | + }, |
| 68 | + width : '100%', |
| 69 | + height : '100%', |
| 70 | + }).embed(element_layer); |
| 71 | + element_layer.style.display = 'block'; |
| 72 | + element_layer.style.zIndex = 999; |
| 73 | + initLayerPosition(); |
| 74 | + } |
| 75 | + |
| 76 | + function initLayerPosition(){ |
| 77 | + var width = 300; //우편번호서비스가 들어갈 element의 width |
| 78 | + var height = 400; //우편번호서비스가 들어갈 element의 height |
| 79 | + var borderWidth = 5; //샘플에서 사용하는 border의 두께 |
| 80 | + |
| 81 | + // 위에서 선언한 값들을 실제 element에 넣는다. |
| 82 | + element_layer.style.width = width + 'px'; |
| 83 | + element_layer.style.height = height + 'px'; |
| 84 | + element_layer.style.border = borderWidth + 'px solid'; |
| 85 | + // 실행되는 순간의 화면 너비와 높이 값을 가져와서 중앙에 뜰 수 있도록 위치를 계산한다. |
| 86 | + element_layer.style.left = (((window.innerWidth || document.documentElement.clientWidth) - width)/2 - borderWidth) + 'px'; |
| 87 | + element_layer.style.top = (((window.innerHeight || document.documentElement.clientHeight) - height)/2 - borderWidth) + 'px'; |
| 88 | + } |
| 89 | + </script> |
| 90 | + <script src="main.dart.js" type="application/javascript"></script> |
| 91 | +</body> |
| 92 | +</html> |
0 commit comments