{"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\\mapDemo.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\Map\\mapDemo.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// import AMap from 'vue-amap'\nexport default {\n  data: function data() {\n    return {\n      map: '',\n      markers: [],\n      positions: [],\n      tipinput: '',\n      placeSearch: '',\n      input: ''\n    };\n  },\n  mounted: function mounted() {\n    var _this = this;\n\n    setTimeout(function () {\n      _this.mapInit();\n\n      _this.setLoacation();\n    }, 1000);\n  },\n  methods: {\n    mapInit: function mapInit() {\n      //初始化地图对象，加载地图\n      var map = new AMap.Map('container', {\n        zoom: 11,\n        resizeEnable: true // pitch: 75,\n        // viewMode:'3D'\n\n      });\n      this.map = map;\n    },\n    showInfoClick: function showInfoClick(e) {\n      if (this.markers) {\n        this.map.remove(this.markers);\n      }\n\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: [e.lnglat.getLng(), e.lnglat.getLat()],\n        offset: new AMap.Pixel(-13, -30)\n      });\n      this.markers = marker;\n      this.positions = [e.lnglat.getLng(), e.lnglat.getLat()];\n      marker.setTitle('我是marker的title');\n      marker.setMap(this.map); // 将创建的点标记添加到已有的地图实例：\n\n      this.map.add(this.markers);\n    },\n    // 事件绑定\n    clickOn: function clickOn() {\n      //   console.log(this.map)\n      //   log.success('绑定事件!')\n      this.map.on('click', this.showInfoClick);\n      this.map.setDefaultCursor('pointer'); //   this.map.on('dblclick', showInfoDbClick)\n      //   this.map.on('mousemove', showInfoMove)\n    },\n    // 解绑事件\n    clickOff: function clickOff() {\n      //   log.success('解除事件绑定!')\n      this.map.off('click', this.showInfoClick);\n      this.map.setDefaultCursor('default'); //   map.off('dblclick', showInfoDbClick)\n      //   map.off('mousemove', showInfoMove)\n    },\n    removeMarkers: function removeMarkers() {\n      this.map.remove(this.markers);\n    },\n    inputSearch: function inputSearch() {\n      var autoOptions = {\n        input: 'tipinput'\n      };\n      var auto = new AMap.Autocomplete(autoOptions);\n      var placeSearch = new AMap.PlaceSearch({\n        map: this.map\n      }); //构造地点查询类\n\n      AMap.event.addListener(auto, 'select', this.select); //注册监听，当选中某条记录时会触发\n\n      this.placeSearch = placeSearch;\n    },\n    select: function select(e) {\n      this.map.clearMap();\n      this.placeSearch.setCity(e.poi.adcode);\n      this.placeSearch.search(e.poi.name); //关键字查询查询\n    },\n    search: function search() {\n      this.map.clearMap();\n      this.placeSearch.search(this.input);\n    },\n    //定位当前位置\n    setLoacation: function setLoacation() {\n      AMap.plugin('Amap.Geolocation', function () {\n        var geolocation = new AMap.Geolocation({\n          // 是否使用高精度定位，默认：true\n          enableHighAccuracy: true,\n          // 设置定位超时时间，默认：无穷大\n          timeout: 10000,\n          // 定位按钮的停靠位置的偏移量，默认：Pixel(10, 20)\n          buttonOffset: new AMap.Pixel(10, 20),\n          //  定位成功后调整地图视野范围使定位位置及精度范围视野内可见，默认：false\n          zoomToAccuracy: true,\n          //  定位按钮的排放位置,  RB表示右下\n          buttonPosition: 'RB'\n        });\n        geolocation.getCurrentPosition();\n        AMap.event.addListener(geolocation, 'complete', onComplete);\n        AMap.event.addListener(geolocation, 'error', onError);\n      });\n    },\n    //获取位置成功的地理位置信息\n    onComplete: function onComplete(data) {\n      console.log(data, 'success');\n    },\n    //获取地理位置失败的信息\n    onError: function onError(data) {\n      console.log(data, 'error');\n    }\n  }\n};",null]}