| | |
| | | if (current_date.getSeconds() != last_time_second) { |
| | | console.log("current_data != ") |
| | | last_time_second = current_date.getSeconds(); |
| | | console.log(current_date,"current_data data") |
| | | changeTaxiLayerStyleAndAttr_Single(getFormattedDateTime(current_date)); |
| | | } |
| | | } else if (map.getLayerById(1004).options.show) { |
| | | console.log("current_data ==") |
| | | var current_date = new Date(Cesium.JulianDate.toDate(event._currentTime)); |
| | | if (current_date.getSeconds() != last_time_second) { |
| | | last_time_second = current_date.getSeconds(); |
| | |
| | | var taxi_qindex = map.getLayerById(1004).options.style_selected; |
| | | let single_taxi = taxi_layer.getGraphicById(mars3d.global_variables.singleTaxiReplayData[0]["code"]); |
| | | if (!single_taxi) { |
| | | console.log("进入第一个if") |
| | | var tmpPositionProperty = new Cesium.SampledPositionProperty(); |
| | | for (var i = 0, len = mars3d.global_variables.singleTaxiReplayData.length; i < len; i++) { |
| | | let item = mars3d.global_variables.singleTaxiReplayData[i]; |
| | | tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2)) |
| | | console.log(tmpPositionProperty,"汽车路线经纬度") |
| | | } |
| | | |
| | | single_taxi = new mars3d.graphic.ModelEntity({ |
| | |
| | | } |
| | | tmpattr = getTaxiAttrFromTimeListData(current_date, mars3d.global_variables.singleTaxiReplayData); |
| | | if (tmpattr && tmpattr != null) { |
| | | console.log("进入第二个if") |
| | | let tmpTaxiColor = getLayerPointColorByQindexandValue(1004, taxi_qindex, tmpattr[taxi_qindex]); |
| | | let tmpTaxigltfurl = "gltf/" + (tmpattr["code"]).substring(0, 2) + tmpTaxiColor.substring(1) + ".gltf"; |
| | | single_taxi.setOptions({ |