최현영

key setting

...@@ -10,10 +10,10 @@ const fs = require('fs'); ...@@ -10,10 +10,10 @@ const fs = require('fs');
10 const path = require('path'); 10 const path = require('path');
11 const HTTPS = require('https'); 11 const HTTPS = require('https');
12 const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' 12 const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
13 -const TOKEN = 'sqNjA99TptppqvcoVFAnU7Kawsl+s7l+JgnZ7r2is97qrFQraIn0sLQ6mTsIPvXLG7FNK34rvjkXbgwuy0/bgrUn4J5eYPn4H/IH27MdimpiXo/yv+obIN9IKlqR+EF2gLmuXSxMU/LWzyGxCk1G0gdB04t89/1O/w1cDnyilFU=' 13 +const TOKEN = 'your Token';
14 -//const workbook = xlsx.readFile(__dirname + '/pyblic/Expressfee.xlsx'); 14 +const apikey1 = "your key";
15 - 15 +const apikey2 = "your key"
16 -const domain = "www.chyoss.tk" 16 +const domain = "your dodmain"
17 const sslport = 23023; 17 const sslport = 23023;
18 18
19 const feebuffer = fs.readFileSync('Expressfee.json'); 19 const feebuffer = fs.readFileSync('Expressfee.json');
...@@ -80,7 +80,7 @@ app.get('/accident', function(req, res){ ...@@ -80,7 +80,7 @@ app.get('/accident', function(req, res){
80 80
81 function jsonforecast(callback){ //교통예보 81 function jsonforecast(callback){ //교통예보
82 var url2 = 'http://data.ex.co.kr/openapi/safeDriving/forecast'; 82 var url2 = 'http://data.ex.co.kr/openapi/safeDriving/forecast';
83 - var queryParams2 = '?' + encodeURIComponent('key') + '=4365330273'; /* Service Key*/ 83 + var queryParams2 = '?' + encodeURIComponent('key') + '=' + apikey1; /* Service Key*/
84 queryParams2 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json'); /* */ 84 queryParams2 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json'); /* */
85 var obj 85 var obj
86 request( 86 request(
...@@ -100,7 +100,7 @@ function jsonforecast(callback){ //교통예보 ...@@ -100,7 +100,7 @@ function jsonforecast(callback){ //교통예보
100 100
101 function jsoncongest(callback){ //교통정체 101 function jsoncongest(callback){ //교통정체
102 var url1 = 'http://data.ex.co.kr/openapi/odtraffic/trafficAmountByCongest'; 102 var url1 = 'http://data.ex.co.kr/openapi/odtraffic/trafficAmountByCongest';
103 - var queryParams1 = '?' + encodeURIComponent('key') + '=4365330273'; /* Service Key*/ 103 + var queryParams1 = '?' + encodeURIComponent('key') + '=' + apikey1; /* Service Key*/
104 queryParams1 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json'); /* */ 104 queryParams1 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json'); /* */
105 105
106 request({ 106 request({
...@@ -118,7 +118,7 @@ function jsoncongest(callback){ //교통정체 ...@@ -118,7 +118,7 @@ function jsoncongest(callback){ //교통정체
118 118
119 function jsonICtoICtime(startICcode, endICcode, callback){ 119 function jsonICtoICtime(startICcode, endICcode, callback){
120 var url3 = 'http://data.ex.co.kr/openapi/trtm/realUnitTrtm'; 120 var url3 = 'http://data.ex.co.kr/openapi/trtm/realUnitTrtm';
121 - var queryParams3 = '?' + encodeURIComponent('key') + '=4365330273'; 121 + var queryParams3 = '?' + encodeURIComponent('key') + '=' + apikey1;;
122 queryParams3 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json'); 122 queryParams3 += '&' + encodeURIComponent('type') + '=' + encodeURIComponent('json');
123 queryParams3 += '&' + encodeURIComponent('iStartUnitCode') + '=' + startICcode + '&' + encodeURIComponent('iEndUnitCode') + '=' + endICcode + '&' + encodeURIComponent('numOfRows') + '=10'+ '&' + encodeURIComponent('pageNo') + '=1' 123 queryParams3 += '&' + encodeURIComponent('iStartUnitCode') + '=' + startICcode + '&' + encodeURIComponent('iEndUnitCode') + '=' + endICcode + '&' + encodeURIComponent('numOfRows') + '=10'+ '&' + encodeURIComponent('pageNo') + '=1'
124 124
...@@ -137,7 +137,7 @@ function jsonICtoICtime(startICcode, endICcode, callback){ ...@@ -137,7 +137,7 @@ function jsonICtoICtime(startICcode, endICcode, callback){
137 137
138 function jsonConstrunction(callback){ 138 function jsonConstrunction(callback){
139 var url4 = 'http://openapi.its.go.kr:8082/api/NEventIdentity'; 139 var url4 = 'http://openapi.its.go.kr:8082/api/NEventIdentity';
140 - var queryParams4 = '?' + encodeURIComponent('key') + '=1590913608992'; /* Service Key*/ 140 + var queryParams4 = '?' + encodeURIComponent('key') + '=' + apikey2; /* Service Key*/
141 queryParams4 += '&ReqType=2&MinX=127.100000&MaxX=128.890000&MinY=34.100000 &MaxY=39.100000&type=ex' 141 queryParams4 += '&ReqType=2&MinX=127.100000&MaxX=128.890000&MinY=34.100000 &MaxY=39.100000&type=ex'
142 142
143 request({ 143 request({
...@@ -154,7 +154,9 @@ function jsonConstrunction(callback){ ...@@ -154,7 +154,9 @@ function jsonConstrunction(callback){
154 } 154 }
155 155
156 function jsonAccident(callback){ 156 function jsonAccident(callback){
157 - var url5 = 'http://openapi.its.go.kr:8082/api/NIncidentIdentity?key=1590913608992&ReqType=2&MinX=127.100000&MaxX=128.890000&MinY=34.100000 &MaxY=39.100000&type=ex'; 157 + var url5 = 'http://openapi.its.go.kr:8082/api/NIncidentIdentity';
158 + var queryParams5 = '?' + encodeURIComponent('key') + '=' + apikey2; /* Service Key*/
159 + queryParams5 += '&ReqType=2&MinX=127.100000&MaxX=128.890000&MinY=34.100000 &MaxY=39.100000&type=ex'
158 160
159 request({ 161 request({
160 url: url5, 162 url: url5,
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 <script type="text/javascript"> 22 <script type="text/javascript">
23 23
24 var API_DOMAIN = 'http://openapi.its.go.kr'; 24 var API_DOMAIN = 'http://openapi.its.go.kr';
25 - var key = '1590913608992'; 25 + var key = 'Your Key';
26 var NOPOP_LAYERS = []; 26 var NOPOP_LAYERS = [];
27 var POPUP_LAYERS = []; 27 var POPUP_LAYERS = [];
28 var EPSG_4326 = new OpenLayers.Projection('EPSG:4326'); 28 var EPSG_4326 = new OpenLayers.Projection('EPSG:4326');
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <div id="map" style="width:100%; height:100%"></div> 9 <div id="map" style="width:100%; height:100%"></div>
10 <style type="text/css"> html, body { height:100%; overflow:hidden } .h-div {height:96%; border:3px #f99 solid} </style> 10 <style type="text/css"> html, body { height:100%; overflow:hidden } .h-div {height:96%; border:3px #f99 solid} </style>
11 <div class="h-div"></div> 11 <div class="h-div"></div>
12 -<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=3ebfae70e971821ab8f14e074d068bdc"></script> 12 +<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=yourkey"></script>
13 <script> 13 <script>
14 var mapContainer = document.getElementById('map'), // 지도를 표시할 div 14 var mapContainer = document.getElementById('map'), // 지도를 표시할 div
15 mapOption = { 15 mapOption = {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 <style type="text/css"> html, body { height:100%; overflow:hidden } .h-div {height:96%; border:3px #f99 solid} </style> 10 <style type="text/css"> html, body { height:100%; overflow:hidden } .h-div {height:96%; border:3px #f99 solid} </style>
11 <div class="h-div"></div> 11 <div class="h-div"></div>
12 12
13 -<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=3ebfae70e971821ab8f14e074d068bdc"></script> 13 +<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=yourkey"></script>
14 <script> 14 <script>
15 var mapContainer = document.getElementById('map'), // 지도를 표시할 div 15 var mapContainer = document.getElementById('map'), // 지도를 표시할 div
16 mapOption = { 16 mapOption = {
......