|
@@ -144,8 +144,8 @@
|
|
|
<!-- // 좌측목록 지도 영역 -->
|
|
|
<!-- 서브 지도 영역 -->
|
|
|
<article class="mapArea statistics">
|
|
|
- <div id="statistics_map">
|
|
|
- </div>
|
|
|
+ <div id="statistics_map"></div>
|
|
|
+ <img class="legend-img" alt="소통등급" src="/common/images/trafficStatus.png">
|
|
|
<div class="move-up" onclick="move(this)"></div>
|
|
|
<div class="mapContent statistics">
|
|
|
<div class="check-text">※ 속도와 통행시간 확인 후 이용하시기 바랍니다.</div>
|
|
@@ -181,8 +181,6 @@
|
|
|
<!-- // 서브 지도 영역 -->
|
|
|
</section>
|
|
|
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=${key}"></script>
|
|
|
-<script src="/js/xlsx-0.18.12.min.js"></script>
|
|
|
-<script src="/js/fileSaver-1.3.8.min.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
let _statLimit = ${statLimit};
|
|
|
let atrdList = '${atrdNmList}';
|
|
@@ -223,14 +221,16 @@
|
|
|
$('.mapContent.statistics').toggleClass('on');
|
|
|
$('#statistics_map').toggleClass('on');
|
|
|
$(el).toggleClass('on');
|
|
|
+ $('.legend-img').toggleClass('on');
|
|
|
}
|
|
|
|
|
|
function optionChange(el) {
|
|
|
const value = $(el).val();
|
|
|
totMoveEvent('list-box', 'selected-ixr');
|
|
|
if (value) {
|
|
|
- $('label[for="ixr_'+value+'"]').click();
|
|
|
- $('label[for="ixr_'+value+'"]').dblclick();
|
|
|
+ const label = $('label[for="ixr_'+value+'"]');
|
|
|
+ label.click();
|
|
|
+ label.dblclick();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -279,13 +279,15 @@
|
|
|
kakao.maps.event.addListener(_Map, 'zoom_changed', function () {
|
|
|
// 지도의 현재 레벨을 얻어옵니다
|
|
|
_Level = _Map.getLevel();
|
|
|
+ // drawRoadMap();
|
|
|
drawRoadMap();
|
|
|
});
|
|
|
|
|
|
kakao.maps.event.addListener(_Map, 'dragend', function () {
|
|
|
+ // drawRoadMap();
|
|
|
+ console.log('test2');
|
|
|
drawRoadMap();
|
|
|
});
|
|
|
-
|
|
|
getAtrdInfo();
|
|
|
|
|
|
/**
|
|
@@ -315,7 +317,7 @@
|
|
|
}
|
|
|
},
|
|
|
complete: function () {
|
|
|
- drawRoadMap()
|
|
|
+ drawRoadMap();
|
|
|
},
|
|
|
error: function (request, status, error) {
|
|
|
},
|
|
@@ -353,11 +355,40 @@
|
|
|
this.x_crdn_min = obj.x_crdn_min;
|
|
|
this.x_crdn_max = obj.x_crdn_max;
|
|
|
this.road_ord = obj.road_ord;
|
|
|
+ this.cmtr_grad_cd = obj.cmtr_grad_cd;
|
|
|
this.obj = obj;
|
|
|
this.polyline = null;
|
|
|
this.polylineBack = null;
|
|
|
this.content = null;
|
|
|
this.marker = null;
|
|
|
+ this.colors = {
|
|
|
+ LTC0 : {
|
|
|
+ text : '정보없음',
|
|
|
+ color : '#888888',
|
|
|
+ },
|
|
|
+ LTC1 : {
|
|
|
+ text: '소통원할',
|
|
|
+ color: '#00981e'
|
|
|
+ },
|
|
|
+ LTC2 : {
|
|
|
+ text: '지체',
|
|
|
+ color: '#fead0e'
|
|
|
+ },
|
|
|
+ LTC3 : {
|
|
|
+ text: '정체',
|
|
|
+ color :'#ff0000'
|
|
|
+ },
|
|
|
+ null : {
|
|
|
+ text : '정보없음',
|
|
|
+ color : '#888888',
|
|
|
+ },
|
|
|
+ '' : {
|
|
|
+ text : '정보없음',
|
|
|
+ color : '#888888',
|
|
|
+ },
|
|
|
+ };
|
|
|
+ this.trvl_hh = obj.trvl_hh;
|
|
|
+ this.sped = obj.sped;
|
|
|
this.makeMarkers();
|
|
|
this.isClick = false;
|
|
|
}
|
|
@@ -366,12 +397,11 @@
|
|
|
let xCrdnArr = this.x_crdn.split(',');
|
|
|
let yCrdnArr = this.y_crdn.split(',');
|
|
|
let linePath = [];
|
|
|
-
|
|
|
for (let ii = 0; ii < xCrdnArr.length; ii++) {
|
|
|
linePath.push(new daum.maps.LatLng(yCrdnArr[ii], xCrdnArr[ii]));
|
|
|
}
|
|
|
-
|
|
|
- const cmtrGradColor = '#00981e';
|
|
|
+ // const cmtrGradColor = this.colors[this.cmtr_grad_cd];
|
|
|
+ const cmtrGradColor = this.colors[this.cmtr_grad_cd].color;
|
|
|
let strokeWeight = 3;
|
|
|
let strokeWeightBack = 5;
|
|
|
let size = 48;
|
|
@@ -420,11 +450,12 @@
|
|
|
if (sectLngt && !isNaN(Number(sectLngt))) {
|
|
|
sectLngt = sectLngt.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
|
|
|
}
|
|
|
- this.content = '<div class="mapPop traffic_LTC0">'
|
|
|
- + '<div class="head"><span class="title">' + obj.road_nm + '</span></div>'
|
|
|
+ this.content = '<div class="mapPop traffic_' + this.cmtr_grad_cd + '">'
|
|
|
+ + '<div class="head"><span class="title">' + obj.road_nm + '</span><span class="traff'
|
|
|
+ + 'ic">' + this.colors[this.cmtr_grad_cd].text + '</span></div>'
|
|
|
+ '<div class="cont"><dl>'
|
|
|
+ '<dt>[ ' + obj.strt_nm_node + ' ] 부터<br/>[ ' + obj.end_nm_node + ' ] 까지</dt>'
|
|
|
- + '<dd>구간거리 : ' + sectLngt + ' m</dd>'
|
|
|
+ + '<dd>소요시간 : 약 ' + obj.trvl_hh + ' 분<br/>평균속도 : ' + obj.sped + ' km/h<br>구간거리 : ' + sectLngt + ' m</dd>'
|
|
|
+ '</dl></div>';
|
|
|
|
|
|
daum.maps.event.addListener(this.polyline, 'mouseover', function (mouseEvent) {
|
|
@@ -515,6 +546,7 @@
|
|
|
|
|
|
_beforeLevel = level;
|
|
|
const currentMarkerArr = _atrdMap.get(level).get("markerObj");
|
|
|
+
|
|
|
currentMarkerArr.forEach((marker)=>{
|
|
|
marker.showHide(_Map);
|
|
|
});
|
|
@@ -560,6 +592,7 @@
|
|
|
const atrd = _AtrdId[ii];
|
|
|
const atrd5 = _atrdMap.get(5).get(atrd);
|
|
|
const atrd6 = _atrdMap.get(6).get(atrd);
|
|
|
+
|
|
|
for (let jj = 0; jj < atrd5.length; jj++) {
|
|
|
const polyObj = atrd5[jj];
|
|
|
bounds.extend(new daum.maps.LatLng(polyObj.y_crdn_min, polyObj.x_crdn_min));
|
|
@@ -570,6 +603,10 @@
|
|
|
}
|
|
|
|
|
|
_Map.setBounds(bounds);
|
|
|
+ const level = getAtrdLevel();
|
|
|
+ const deleteLevel = level === 5 ? 6 : 5;
|
|
|
+ _atrdMap.get(deleteLevel).get(_AtrdId[0])[0].marker.setMap(null);
|
|
|
+ _atrdMap.get(deleteLevel).get(_AtrdId[1])[0].marker.setMap(null);
|
|
|
}
|
|
|
|
|
|
function excelDown(){
|