zhaoxing
2022-10-21 a3edf279a91d6b1791221ea9d3a69e43409915af
添加黑地图,轨迹查询自动变成车号,车辆出上海边界不显示
8个文件已修改
48 ■■■■■ 已修改文件
config/config.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/changable_params.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/function.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/function_1004.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/taxiRouteReplay/view.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/taxiRouteReplay/widget.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_search/widget.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/widget.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/config.json
@@ -85,6 +85,14 @@
          { "name": "底图", "type": "tdt", "layer": "vec_d", "key": ["51915011aa0997aa2ddd7e38504fa8bc"] }
        ],
        "zIndex": 0
      },
      {
        "pid": 10,
        "name": "黑色底图",
        "icon": "/img/basemaps/bd-c-dark.png",
        "type": "tencent",
        "layer": "custom",
        "style": "4"
      }
    ],
    "layers": [
js/changable_params.js
@@ -57,15 +57,21 @@
var default_grid_camerview = {grid5000:{"lat":30.367931,"lng":121.518409,"alt":128482,"heading":2,"pitch":-57},grid3000:{"lat":30.902475,"lng":121.487751,"alt":38716,"heading":2,"pitch":-57},grid1000:{"lat":31.066346,"lng":121.462529,"alt":10026,"heading":2,"pitch":-57},grid500:{"lat":31.112561,"lng":121.458433,"alt":2483,"heading":2,"pitch":-57}};
function bindPopupFunction(event) {
  let layerid = event.layer.options.id;
  let item = event.graphic?.attr;
  let qindex = event.layer.options.style_selected;
  console.log(item["datatime"],"poup.item")
  // console.log(event)
  if (!item) {
    return "";
  }
  item = changeNullAndundefinedToEmpty(item);
  let item_time = item["datatime"].split(" ")
  console.log(item_time,"poup.item")
  if(item_time[1] === "00:00:00"){
    item["datatime"] = item_time[0]
  }
  console.log(item["datatime"],"after")
  if (layerid == 1001) {
    return "站点编号:" +
      item["code"] +
js/function.js
@@ -241,7 +241,7 @@
              color: "rgb(2,26,79)",
              outline: true,
              outlineColor: "#39E09B",
              outlineWidth: 8,
              outlineWidth: 3,
              outlineOpacity: 0.8,
              arcType: Cesium.ArcType.GEODESIC,
              clampToGround: true,
js/function_1004.js
@@ -229,13 +229,10 @@
      if(regionCode == 0){
        $.getJSON("./data/shanghai.json", (result2) => {
          polygon_Points = result2.features[0].geometry.coordinates[0][0]
          console.log(polygon_Points,"上海边界")
          for (var i = 0, len = result.data.result.length; i < len; i++) {
            let item = result.data.result[i];
            console.log(item.lon,item.lat,polygon_Points)
            let isIn = isInPolygon([item.lon,item.lat],polygon_Points)
            if(isIn){
              console.log("进来了")
                tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
              }
          }
widgetsTS/taxiRouteReplay/view.js
@@ -52,10 +52,11 @@
  //开始查询轨迹
  $("#startQueryTaxiData").click(function () {
    console.log(thisWidget.taxi_sn,"汽车编号")
    haoutil.loading.show();
    thisWidget.appDateHourStart = $("#appDateHourStart").val()
    thisWidget.appDateHourEnd = $("#appDateHourEnd").val()
    if(!$("#taxisn").val() || $("#taxisn").val()=='') {$("#taxisn").val(thisWidget.taxi_sn)}
    if($("#taxisn").val() || $("#taxisn").val()=='') {$("#taxisn").val(thisWidget.taxi_sn)}
    $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + $("#taxisn").val(), {
    // $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + thisWidget.taxi_sn, {
      datatime1: thisWidget.appDateHourStart,
@@ -132,7 +133,10 @@
}
function resetStartQueryTaxiDataText(taxi) {
  $("#startQueryTaxiDataText").text("轨迹查询(" + taxi + ")");
  console.log(taxi,"taxi编号")
  $("#taxisn").val(taxi)
  // $("#startQueryTaxiDataText").text("轨迹查询(" + taxi + ")");
  $("#route_box").hide();
}
widgetsTS/taxiRouteReplay/widget.js
@@ -13,8 +13,10 @@
    }
 
    reloadData(new_taxi_sn) {
      this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
      console.log(new_taxi_sn,"reload")
      this.taxi_sn = new_taxi_sn;
      this.viewWindow.resetStartQueryTaxiDataText(this.taxi_sn);
 
      if (this.startGraphic) {
        this.startGraphic.remove();
@@ -75,7 +77,7 @@
          position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
        }
        item = changeNullAndundefinedToEmpty(item)
        console.log(item,"路线item",item[this.qindex])
        // console.log(item,"路线item",item[this.qindex])
      let graphic = new mars3d.graphic.PolylineEntity({
        positions: [position,position2],
        style: {
@@ -218,6 +220,7 @@
    //每个窗口创建完成后调用
    winCreateOK(opt, result) {
      this.viewWindow = result;
      console.log(this.config.params,"this.taxi_sn")
      this.appDateHourStart = mars3d.global_variables.queryDataTStartTaxi;
      this.appDateHourEnd = mars3d.global_variables.queryDataTEnd;
      this.nodejs_url_predix = mars3d.global_variables.nodejs_url_predix;
widgetsTS/widget_search/widget.js
@@ -163,12 +163,12 @@
            var road = new mars3d.graphic.CorridorPrimitive({
                positions: positions,
                style: {
                    width: 80,
                    opacity: 0.75,
                    width: 150,
                    opacity: 1,
                    //closure: true,
                    height: 0,
                    cornerType: Cesium.CornerType.MITERED,
                    diffHeight: qindex == "co" ? 1000 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 3000 : attr[qindex], //高度
                    diffHeight: qindex == "co" ? 500 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 2000 : attr[qindex], //高度
                    color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex] || "#C0C0C0"),
                    // material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
                    //     //动画线材质
widgetsTS/widget_summary/widget.js
@@ -173,12 +173,12 @@
            var road = new mars3d.graphic.CorridorPrimitive({
                positions: positions,
                style: {
                    width: 80,
                    opacity: 0.75,
                    width: 150,
                    opacity: 1,
                    //closure: true,
                    height: 0,
                    cornerType: Cesium.CornerType.MITERED,
                    diffHeight: qindex == "co" ? 1000 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 3000 : attr[qindex],//高度
                    diffHeight: qindex == "co" ? 500 * attr[qindex] :  attr[qindex] || attr[qindex] == "/" ? 2000 : attr[qindex],//高度
                    color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex]),
                    // material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
                    //     //动画线材质