{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Map\\maptest.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Map\\maptest.vue","mtime":1675071992678},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.search\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar marker,\n    lineArr = [[116.478935, 39.997761], [116.478939, 39.997825], [116.478912, 39.998549], [116.478912, 39.998549], [116.478998, 39.998555], [116.478998, 39.998555], [116.479282, 39.99856], [116.479658, 39.998528], [116.480151, 39.998453], [116.480784, 39.998302], [116.480784, 39.998302], [116.481149, 39.998184], [116.481573, 39.997997], [116.481863, 39.997846], [116.482072, 39.997718], [116.482362, 39.997718], [116.483633, 39.998935], [116.48367, 39.998968], [116.484648, 39.999861]];\nexport default {\n  data: function data() {\n    return {\n      mapvalue: '',\n      map: '',\n      markers: '',\n      lnglatvalue: [106.545034, 29.549649],\n      drawer: false,\n      direction: 'rtl',\n      start: true,\n      startShow: false,\n      cities: ['桥梁', '隧道', '涵洞', '边坡'],\n      checkboxGroup1: ['桥梁']\n    };\n  },\n  methods: {\n    handleClose: function handleClose(done) {\n      done();\n    },\n    //初始化地图\n    initMap: function initMap() {\n      var _this = this;\n\n      var map = new AMap.Map('container', {\n        resizeEnable: true,\n        // center: [106.544857, 29.549371],\n        zoom: 17\n      });\n      map.on('click', function (e) {\n        console.log(e);\n        _this.lnglatvalue = [e.lnglat.getLng(), e.lnglat.getLat()];\n\n        _this.addMaker(_this.lnglatvalue);\n      });\n      this.map = map;\n    },\n    //定位\n    location: function location() {\n      var map = this.map;\n      this.startShow = false;\n      AMap.plugin('AMap.Geolocation', function () {\n        var geolocation = new AMap.Geolocation({\n          enableHighAccuracy: true,\n          //是否使用高精度定位，默认:true\n          timeout: 10000,\n          //超过10秒后停止定位，默认：5s\n          buttonPosition: 'RB',\n          //定位按钮的停靠位置\n          buttonOffset: new AMap.Pixel(10, 20),\n          //定位按钮与设置的停靠位置的偏移量，默认：Pixel(10, 20)\n          zoomToAccuracy: true //定位成功后是否自动调整地图视野到定位点\n\n        });\n        map.addControl(geolocation);\n      });\n    },\n    //轨迹回放\n    Animamap: function Animamap() {\n      this.drawer = false;\n      this.startShow = true;\n      this.map.clearMap();\n      var map = this.map;\n      marker = new AMap.Marker({\n        map: map,\n        position: [116.478935, 39.997761],\n        icon: 'https://webapi.amap.com/images/car.png',\n        offset: new AMap.Pixel(-26, -13),\n        autoRotation: true,\n        angle: -90\n      }); //为走过\n\n      var polyline = new AMap.Polyline({\n        map: map,\n        path: lineArr,\n        showDir: true,\n        strokeColor: '#28F',\n        //线颜色\n        // strokeOpacity: 1,     //线透明度\n        strokeWeight: 6 //线宽\n        // strokeStyle: \"solid\"  //线样式\n\n      }); //走过\n\n      var passedPolyline = new AMap.Polyline({\n        map: map,\n        // path: lineArr,\n        strokeColor: '#AF5',\n        //线颜色\n        // strokeOpacity: 1,     //线透明度\n        strokeWeight: 6 //线宽\n        // strokeStyle: \"solid\"  //线样式\n\n      });\n      marker.on('moving', function (e) {\n        passedPolyline.setPath(e.passedPath);\n      });\n      this.markers = marker;\n      map.setFitView();\n    },\n    startAnimation: function startAnimation() {\n      this.start = true;\n      this.stopAnimation();\n      marker.moveAlong(lineArr, 200);\n    },\n    pauseAnimation: function pauseAnimation() {\n      this.start = !this.start;\n      marker.pauseMove();\n    },\n    resumeAnimation: function resumeAnimation() {\n      this.start = !this.start;\n      marker.resumeMove();\n    },\n    stopAnimation: function stopAnimation() {\n      marker.stopMove();\n    },\n    removemaker: function removemaker() {\n      this.map.remove(this.markers);\n    },\n    getmap: function getmap() {\n      this.map.clearMap();\n      var map = this.map;\n      var placeSearch = new AMap.PlaceSearch({\n        // city 指定搜索所在城市，支持传入格式有：城市名、citycode和adcode\n        city: '全国'\n      });\n\n      if (this.mapvalue) {\n        placeSearch.search(this.mapvalue, function (status, result) {\n          // 查询成功时，result即对应匹配的POI信息\n          console.log(result);\n          var pois = result.poiList.pois;\n\n          for (var i = 0; i < pois.length; i++) {\n            var poi = pois[i];\n            var _marker = [];\n            _marker[i] = new AMap.Marker({\n              position: poi.location,\n              // 经纬度对象，也可以是经纬度构成的一维数组[116.39, 39.9]\n              title: poi.name\n            }); // 将创建的点标记添加到已有的地图实例：\n\n            map.add(_marker[i]);\n            console.log(_marker[i]);\n          }\n\n          map.setFitView();\n        });\n      } else {\n        this.$message.error('请输入关键字');\n      }\n    },\n    //地图点击标点\n    addMaker: function addMaker(lnglatvalue) {\n      this.map.clearMap();\n      var map = this.map;\n      var icon = new AMap.Icon({\n        size: new AMap.Size(25, 34),\n        image: '//a.amap.com/jsapi_demos/static/demo-center/icons/dir-marker.png',\n        imageSize: new AMap.Size(135, 40),\n        imageOffset: new AMap.Pixel(-95, -3)\n      });\n      var marker = new AMap.Marker({\n        icon: icon,\n        position: lnglatvalue,\n        offset: new AMap.Pixel(-13, -30)\n      });\n      marker.setMap(map); // 设置鼠标划过点标记显示的文字提示\n\n      marker.setTitle('我是marker的title'); // 设置label标签\n      // label默认蓝框白底左上角显示，样式className为：amap-marker-label\n\n      marker.setLabel({\n        offset: new AMap.Pixel(20, 20),\n        //设置文本标注偏移量\n        content: this.mapvalue,\n        //设置文本标注内容\n        direction: 'right' //设置文本标注方位\n\n      });\n    }\n  },\n  mounted: function mounted() {\n    var _this2 = this;\n\n    setTimeout(function () {\n      _this2.initMap();\n\n      _this2.location();\n\n      _this2.startShow = false;\n    }, 1000);\n  }\n};",null]}