| | |
| | | import { flatPath, formatNodeForCascader, getDepartmentRoot } from "../../../api/hierarchy"; |
| | | |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode: 'ba4138d0c0efb13d1d5fd10df08bb0d1', |
| | | securityJsCode: '93f97fa744d6922ff21c53e4b4981064', |
| | | } |
| | | |
| | | const { Option } = Select; |
| | |
| | | |
| | | initMap = () => { |
| | | AMapLoader.load({ |
| | | key: "1c53e2a2bb2218895e9a9f672df36840", |
| | | key: "6edc6798d22e5a46660ff46560b1e612", |
| | | plugins: ['AMap.ToolBar', 'AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.Marker'], |
| | | }).then((AMap) => { |
| | | this.AMap = AMap; |
| | |
| | | |
| | | // export const BASE_URL = 'http://47.93.28.249:8181' |
| | | // export const BASE_URL = 'http://192.168.110.188:8182'; //测试 |
| | | export const BASE_URL = 'http://192.168.110.111:8182'; //测试 |
| | | // export const BASE_URL = 'http://47.108.113.190:8182'; |
| | | // export const BASE_URL = 'http://192.168.110.111:8182'; //测试 |
| | | export const BASE_URL = 'http://47.108.113.190:8182'; |
| | | // export const SCREEN_URL = 'http://221.182.45.100:8087/#/'; 测试 |
| | | export const SCREEN_URL = 'http://xllpgzx.com/screen/#/'; |
| | | |
| | |
| | | import {projectTypeMap} from "../../common/constants"; |
| | | |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode: 'ba4138d0c0efb13d1d5fd10df08bb0d1', |
| | | securityJsCode: '93f97fa744d6922ff21c53e4b4981064', |
| | | } |
| | | // const geocoder = new AMap.Geocoder({ |
| | | // apiKey: '62d95204ea3dfb3061cd678bd8e40995' |
| | |
| | | // 2.dom渲染成功后进行map对象的创建 |
| | | componentDidMount() { |
| | | AMapLoader.load({ |
| | | key: "1c53e2a2bb2218895e9a9f672df36840", // 申请好的Web端开发者Key,首次调用 load 时必填 |
| | | key: "6edc6798d22e5a46660ff46560b1e612", // 申请好的Web端开发者Key,首次调用 load 时必填 |
| | | // version:"2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
| | | plugins: ['AMap.Scale'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 |
| | | AMapUI: { |
| | |
| | | } |
| | | |
| | | //导出地图组建类 |
| | | export default MapComponent; |
| | | export default MapComponent; |
| | |
| | | |
| | | getDistrictData = (keyword = "", level = 0) => { |
| | | // subdistrict=1 只获取下一级 |
| | | const url = `https://restapi.amap.com/v3/config/district?keywords=${keyword}&subdistrict=1&key=aeec2a4b436322753dd2458fde89506b`; |
| | | const url = `https://restapi.amap.com/v3/config/district?keywords=${keyword}&subdistrict=1&key=af882f8998e5c0f8eadfdeac4a8ccf87`; |
| | | return fetch(url) |
| | | .then(response => response.json()) |
| | | .then(data => { |
| | |
| | | <script src="https://cache.amap.com/lbs/static/es5.min.js"></script> |
| | | <script type="text/javascript"> |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode: "c75eccf0742998b2ea43823e08cacccd", |
| | | securityJsCode: "93f97fa744d6922ff21c53e4b4981064", |
| | | }; |
| | | </script> |
| | | <script src="https://webapi.amap.com/loader.js"></script> |
| | |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | |
| | | </html> |
| | | </html> |
| | |
| | | |
| | | // 获取高德地图区域数据 |
| | | getDistrictData (keyword = '', level = 0) { |
| | | const url = `https://restapi.amap.com/v3/config/district?keywords=${keyword}&subdistrict=1&key=aeec2a4b436322753dd2458fde89506b` |
| | | const url = `https://restapi.amap.com/v3/config/district?keywords=${keyword}&subdistrict=1&key=af882f8998e5c0f8eadfdeac4a8ccf87` |
| | | return fetch(url) |
| | | .then((response) => response.json()) |
| | | .then((data) => { |
| | |
| | | this.activeTab = Number(sessionStorage.getItem('activeTab')) |
| | | } |
| | | this.mapPromise = window.AMapLoader.load({ |
| | | key: '232929db1cb31f26d42b3645a7456154', |
| | | key: '6edc6798d22e5a46660ff46560b1e612', |
| | | version: '2.0', |
| | | plugins: ['AMap.DistrictSearch', 'AMap.Geocoder'], |
| | | AMapUI: { |
| | |
| | | setMapload () { |
| | | if (!this.mapPromise) { |
| | | this.mapPromise = window.AMapLoader.load({ |
| | | key: '232929db1cb31f26d42b3645a7456154', |
| | | key: '6edc6798d22e5a46660ff46560b1e612', |
| | | version: '2.0', |
| | | plugins: ['AMap.DistrictSearch', 'AMap.Geocoder'], |
| | | AMapUI: { |
| | |
| | | (typeof AMapLoader !== 'undefined' ? AMapLoader : null) |
| | | if (!loader) return |
| | | this.mapPromise = loader.load({ |
| | | key: '232929db1cb31f26d42b3645a7456154', |
| | | key: '6edc6798d22e5a46660ff46560b1e612', |
| | | version: '2.0', |
| | | plugins: ['AMap.Geocoder'] |
| | | }) |
| | |
| | | return Promise.reject(new Error('AMapLoader is not available')) |
| | | } |
| | | this.mapPromise = loader.load({ |
| | | key: '232929db1cb31f26d42b3645a7456154', |
| | | key: '6edc6798d22e5a46660ff46560b1e612', |
| | | version: '2.0', |
| | | plugins: ['AMap.Geocoder'] |
| | | }) |