{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/map_arcGIS.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/map_arcGIS.vue","mtime":1725957645725},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["\nimport Vue from 'vue'\nimport esriLoader from \"esri-loader\";\nexport default {\n name: \"\",\n \n components: {},\n \n props: [\n \"field\",\n ],\n \n data() {\n return {};\n },\n \n created() {},\n \n mounted() {\n // const option = {url: 'https://js.arcgis.com/4.3/'} //注意:不同版本的ArcGIS API的用法可能不一样\n const option = {url: 'https://js.arcgis.com/4.16/'}\n esriLoader.loadModules (\n [\n \"esri/Map\",\n 'esri/views/MapView',\n \"esri/widgets/Search\",\n \"esri/layers/MapImageLayer\",\n \"esri/widgets/Locate\",\n \"esri/Graphic\",\n \"esri/request\",\n \"esri/widgets/Search/SearchSource\",\n \"esri/geometry/geometryEngine\",\n \"esri/geometry/Point\",\n \"esri/widgets/Expand\",\n \"esri/widgets/BasemapGallery\",\n \"dojo/domReady!\",\n ], option\n )\n .then (([\n Map,\n MapView,\n Search,\n MapImageLayer,\n Locate,\n Graphic,\n esriRequest,\n SearchSource,\n geometryEngine,\n Point,\n Expand,\n BasemapGallery,\n ]) => {\n const map = new Map ({\n basemap: \"streets\",\n backgroundColor: \"#eee\",\n logo: false,\n slider: false,\n setZoom: 4,\n })\n const view = new MapView ({\n backgroundColor: \"#eee\",\n container: this.field ? (this.field.openType === 'dialog' && this.field.maptype === 'arcgis' ? 'arcgis_dialog_id': this.field.id): 'arcgis_view',\n map: map,\n zoom: 4,\n minZoom: 4,\n center: [ 113.17, 23.8 ],\n setZoom: 4,\n });\n var search = new Search({\n view: view,\n });\n view.ui.add(search, {\n position: \"top-right\",\n index: 2\n });\n\n var locateBtn =new Locate({\n view: view,\n });\n view.ui.add(locateBtn, {\n position: \"top-left\"\n });\n\n var basemapGallery = new BasemapGallery({\n view: view,\n container: document.createElement(\"div\")\n });\n var bgExpand = new Expand({\n view: view,\n content: basemapGallery\n });\n basemapGallery.watch(\"activeBasemap\", function() {\n var mobileSize =\n view.heightBreakpoint === \"xsmall\" ||\n view.widthBreakpoint === \"xsmall\";\n\n if (mobileSize) {\n bgExpand.collapse();\n }\n });\n\n\n view.ui.add(bgExpand, \"top-right\");\n \n }, reason => {\n console.log (reason);\n })\n },\n\n \n computed: {},\n \n methods: {}\n};\n",null]}