diff --git a/img/luncin.png b/img/luncin.png new file mode 100644 index 0000000..bfcb243 Binary files /dev/null and b/img/luncin.png differ diff --git a/js/i18n.js b/js/i18n.js index da035c7..862060a 100644 --- a/js/i18n.js +++ b/js/i18n.js @@ -74,6 +74,9 @@ $(".citylist").on('click', '.item', function() { $(".departure_time").html(data.departure_time) $(".status").html(data.status) $(".arrival_time").html(data.arrival_time) + if(data.ship_id&&data.ship_id!=null&&data.ship_id!=''){ + Global(chinaGeoCoordMap,nameMap,localStorage.getItem("lang"),data.ship_id) + } }); //初始化滚动 function listsc() { diff --git a/js/public.js b/js/public.js index 629f416..95b9167 100644 --- a/js/public.js +++ b/js/public.js @@ -2898,7 +2898,7 @@ var roters=[ // } // })); -function Global(chinaGeoCoordMap, nameMap, isshow) { +function Global(chinaGeoCoordMap, nameMap, isshow,shipid) { // console.log(isshow) // 从世界数据中移除中国部分 @@ -2910,19 +2910,29 @@ function Global(chinaGeoCoordMap, nameMap, isshow) { echarts.registerMap('china-africa', africa); // console.log(lineDatas) var shipList = function(){ - var routePoints = shipListdatas.map(point => ({ - name: point.ship_name, - id: point.id, - dest: point.port, - eta: point.last_time, - value:[point.lng,point.lat], - num:point.count, - symbol: 'image://img/luncx.png', - symbolSize:60, - itemStyle: { - color: '#fff' - } - })) + var routePoints=[] + $.each(shipListdatas,function(){ + var imgs = 'image://img/luncx.png' + var symbolSize = 60 + if(shipid&&shipid==this.id){ + imgs = 'image://img/luncin.png' + symbolSize =80 + } + var obj = { + name: this.ship_name, + id: this.id, + dest: this.port, + eta: this.last_time, + value:[this.lng,this.lat], + num:this.count, + symbol: imgs, + symbolSize:symbolSize, + itemStyle: { + color: '#fff' + } + } + routePoints.push(obj) + }); return routePoints } //生产城市