quanyawei
2023-10-09 459a7edb609bb4dcfe153f02d178330b6024ef49
no message
1 files modified
40 ■■■■ changed files
src/views/UVA/index.vue 40 ●●●● patch | view | raw | blame | history
src/views/UVA/index.vue
@@ -1226,8 +1226,8 @@
      this.abc += 1
      const that = this
      if (!res) {
        that.map = new BMap.Map('map_container')
        console.log('BMap', BMap)
        that.map = new BMapGL.Map('map_container')
        console.log('BMapGL', BMapGL)
        console.log('BMapGL', BMapGL)
        console.log('window', window.BMapGL)
        that.map.enableScrollWheelZoom(true) // 开启鼠标滚轮,地图可以进行放大、缩小s
@@ -1308,7 +1308,7 @@
            // lat = GPS.bd_encrypt(lat, lng).lat
            // lng = GPS.bd_decrypt(lat, lng).lon
            // lat = GPS.bd_decrypt(lat, lng).lat
            var point = new BMap.Point(lng, lat)
            var point = new BMapGL.Point(lng, lat)
            point.a34004 = parseInt(value.a34004)
            point.a34002 = parseInt(value.a34002)
            point.a21026 = parseInt(value.a21026)
@@ -1419,12 +1419,12 @@
          var data = point[sensor]
          // 根据因子浓度变换方块颜色
          var color = getColorAndLevel(sensor, data).color
          var polygon = new BMap.Polygon(
          var polygon = new BMapGL.Polygon(
            [
              new BMap.Point(sw.lng, sw.lat), // 左下角
              new BMap.Point(ne.lng, sw.lat), // 左上角
              new BMap.Point(ne.lng, ne.lat), // 右上角
              new BMap.Point(sw.lng, ne.lat) // 右下角
              new BMapGL.Point(sw.lng, sw.lat), // 左下角
              new BMapGL.Point(ne.lng, sw.lat), // 左上角
              new BMapGL.Point(ne.lng, ne.lat), // 右上角
              new BMapGL.Point(sw.lng, ne.lat) // 右下角
            ],
            {
              strokeWeight: 0.1, // 边框线的宽度,以像素为单位
@@ -1443,24 +1443,24 @@
      // 起点和终点标注
      function drawStartAndEnd() {
        var startIcon = new BMap.Icon(
        var startIcon = new BMapGL.Icon(
          require('@/assets/images/start.png'),
          new BMap.Size(48, 48)
          new BMapGL.Size(48, 48)
        )
        var startMark = new BMap.Marker(that.showPoints[0], {
        var startMark = new BMapGL.Marker(that.showPoints[0], {
          icon: startIcon,
          offset: new BMap.Size(0, -20)
          offset: new BMapGL.Size(0, -20)
        })
        that.map.addOverlay(startMark)
        var endIcon = new BMap.Icon(
        var endIcon = new BMapGL.Icon(
          require('@/assets/images/end.png'),
          new BMap.Size(48, 48)
          new BMapGL.Size(48, 48)
        )
        var endMark = new BMap.Marker(
        var endMark = new BMapGL.Marker(
          that.showPoints[that.showPoints.length - 1],
          {
            icon: endIcon,
            offset: new BMap.Size(0, -20)
            offset: new BMapGL.Size(0, -20)
          }
        )
        that.map.addOverlay(endMark)
@@ -1540,7 +1540,7 @@
        lng = (lng * 180) / Math.PI
        lat = (lat * 180) / Math.PI
        // console.log(lng, lat)
        return new BMap.Point(lng, lat)
        return new BMapGL.Point(lng, lat)
      }
      function getGrading(sensor, type, carMac) {
@@ -1891,14 +1891,14 @@
      // point上添加label文本
      function setLabelStyle(content, point) {
        var label = new BMap.Label(
        var label = new BMapGL.Label(
          "<span class='my-maptip'>" + content + '<br /><span>', // 为lable填写内容
          {
            offset: new BMap.Size(-8, -10), // label的偏移量,为了让label的中心显示在点上
            offset: new BMapGL.Size(-8, -10), // label的偏移量,为了让label的中心显示在点上
            position: point
          } // label的位置
        )
        var offsetSize = new BMap.Size(0, 0)
        var offsetSize = new BMapGL.Size(0, 0)
        var size = '10px'
        if (that.map.getZoom() <= 15.5) {
          size = '0px'