Commit fc08153e authored by 邓晓峰's avatar 邓晓峰

feat: 集成ARGGIS

parent f432d5fc
......@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@a11y/focus-trap": {
"version": "1.0.5",
"resolved": "https://g.civnet.cn:4873/@a11y%2ffocus-trap/-/focus-trap-1.0.5.tgz",
"integrity": "sha1-B0gYnDfKISVccCql3j7gDtSCHSI="
},
"@ahooksjs/use-request": {
"version": "2.8.13",
"resolved": "https://g.civnet.cn:4873/@ahooksjs%2fuse-request/-/use-request-2.8.13.tgz",
......@@ -181,6 +186,21 @@
}
}
},
"@arcgis/core": {
"version": "4.22.2",
"resolved": "https://g.civnet.cn:4873/@arcgis%2fcore/-/core-4.22.2.tgz",
"integrity": "sha512-twx50yjKsMoeotgQfnYHmm4EIS57fC9rWNNrvGc2xERVUOY7p2fFPs2qemdyFnCmvrRNflZcnZkxrTZXeDCtow==",
"requires": {
"@esri/arcgis-html-sanitizer": "~2.9.0-next.1",
"@esri/calcite-colors": "~6.0.1",
"@esri/calcite-components": "1.0.0-beta.69",
"@popperjs/core": "~2.10.2",
"focus-trap": "~6.7.1",
"luxon": "~2.1.1",
"moment": "~2.29.1",
"sortablejs": "~1.14.0"
}
},
"@babel/cli": {
"version": "7.4.3",
"resolved": "https://g.civnet.cn:4873/@babel%2fcli/-/cli-7.4.3.tgz",
......@@ -2141,6 +2161,52 @@
}
}
},
"@esri/calcite-components": {
"version": "1.0.0-beta.69",
"resolved": "https://g.civnet.cn:4873/@esri%2fcalcite-components/-/calcite-components-1.0.0-beta.69.tgz",
"integrity": "sha1-SjGX1Thxp5byK0UUKO+o0kBGoVI=",
"requires": {
"@a11y/focus-trap": "1.0.5",
"@popperjs/core": "2.10.2",
"@stencil/core": "2.10.0",
"@types/color": "3.0.2",
"color": "4.0.1",
"lodash-es": "4.17.21",
"sortablejs": "1.14.0"
},
"dependencies": {
"@types/color": {
"version": "3.0.2",
"resolved": "https://g.civnet.cn:4873/@types%2fcolor/-/color-3.0.2.tgz",
"integrity": "sha1-N3kEPngvViqpFXtfxr0H4U/Y5/M=",
"requires": {
"@types/color-convert": "*"
}
},
"color": {
"version": "4.0.1",
"resolved": "https://g.civnet.cn:4873/color/-/color-4.0.1.tgz",
"integrity": "sha1-Id9EzRAkWpGxzPW6AxYJsOEOfWc=",
"requires": {
"color-convert": "^2.0.1",
"color-string": "^1.6.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://g.civnet.cn:4873/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://g.civnet.cn:4873/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
}
}
},
"@exodus/schemasafe": {
"version": "1.0.0-rc.6",
"resolved": "https://g.civnet.cn:4873/@exodus%2fschemasafe/-/schemasafe-1.0.0-rc.6.tgz",
......@@ -2536,6 +2602,11 @@
}
}
},
"@popperjs/core": {
"version": "2.10.2",
"resolved": "https://g.civnet.cn:4873/@popperjs%2fcore/-/core-2.10.2.tgz",
"integrity": "sha1-B5jAM1Hw3qGlpMq93yalWny+5ZA="
},
"@qixian.cs/path-to-regexp": {
"version": "6.1.0",
"resolved": "https://g.civnet.cn:4873/@qixian.cs%2fpath-to-regexp/-/path-to-regexp-6.1.0.tgz",
......@@ -2619,6 +2690,11 @@
"integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
"dev": true
},
"@stencil/core": {
"version": "2.10.0",
"resolved": "https://g.civnet.cn:4873/@stencil%2fcore/-/core-2.10.0.tgz",
"integrity": "sha1-rPRLmuZXiiDw0Jv5QpboM76tyIU="
},
"@stylelint/postcss-css-in-js": {
"version": "0.37.2",
"resolved": "https://g.civnet.cn:4873/@stylelint%2fpostcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz",
......@@ -4542,7 +4618,6 @@
"version": "2.0.0",
"resolved": "https://g.civnet.cn:4873/@types%2fcolor-convert/-/color-convert-2.0.0.tgz",
"integrity": "sha1-j17muehj3L7lcD9aUX/7E9PqTiI=",
"dev": true,
"requires": {
"@types/color-name": "*"
}
......@@ -4550,8 +4625,7 @@
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://g.civnet.cn:4873/@types%2fcolor-name/-/color-name-1.1.1.tgz",
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
},
"@types/compression": {
"version": "1.7.0",
......@@ -7548,10 +7622,11 @@
}
},
"@wisdom-map/arcgismap": {
"version": "1.0.60-0",
"resolved": "https://g.civnet.cn:4873/@wisdom-map%2farcgismap/-/arcgismap-1.0.60-0.tgz",
"integrity": "sha512-My2JGb2y/xUwW0xMd/IL4xpdjK1BdN8X8GOSAMtR1yVLGXXXQhyyoY0okqALCxSGoxLa+VRYodKhtomPrCKMLQ==",
"version": "1.0.75-0",
"resolved": "https://g.civnet.cn:4873/@wisdom-map%2farcgismap/-/arcgismap-1.0.75-0.tgz",
"integrity": "sha512-er5AxKI6zbaHTkvoDDs5I4uwtBElCkdeybdO7ZqkQnHNuKVvl250QYZy54wBNwPE1c2jQbbW/xEDZIKeuIRPgQ==",
"requires": {
"@arcgis/core": "^4.22.2",
"@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.12.0",
"@wisdom-map/util": "^1.0.28-0",
......@@ -7559,9 +7634,9 @@
},
"dependencies": {
"@wisdom-map/util": {
"version": "1.0.28-0",
"resolved": "https://g.civnet.cn:4873/@wisdom-map%2futil/-/util-1.0.28-0.tgz",
"integrity": "sha512-jKRmiYu3SuDmYjCojaZP8UFr4LQR40MLcp1AEfir4lSLiNNLtdA83wTt60J1ZOkWKRBbJXgUpuQB1yoU7dIqcg=="
"version": "1.0.28-7",
"resolved": "https://g.civnet.cn:4873/@wisdom-map%2futil/-/util-1.0.28-7.tgz",
"integrity": "sha512-tVqklwqtaJkXTNttNCvU5qCZCbOoRa0PSfBcXVMwpkp106KSdE8BBfr/VE5p3ndacGAr5YqY3UJCCZDgnPXs2w=="
},
"react": {
"version": "16.14.0",
......@@ -10085,14 +10160,12 @@
"color-name": {
"version": "1.1.3",
"resolved": "https://g.civnet.cn:4873/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"color-string": {
"version": "1.6.0",
"resolved": "https://g.civnet.cn:4873/color-string/-/color-string-1.6.0.tgz",
"integrity": "sha1-w5FfYf4mdnLLfh4GTJ1pIhn2wxI=",
"dev": true,
"requires": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
......@@ -14029,6 +14102,14 @@
"integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=",
"dev": true
},
"focus-trap": {
"version": "6.7.3",
"resolved": "https://g.civnet.cn:4873/focus-trap/-/focus-trap-6.7.3.tgz",
"integrity": "sha512-8xCEKndV4KrseGhFKKKmczVA14yx1/hnmFICPOjcFjToxCJYj/NHH43tPc3YE/PLnLRNZoFug0EcWkGQde/miQ==",
"requires": {
"tabbable": "^5.2.1"
}
},
"follow-redirects": {
"version": "1.14.4",
"resolved": "https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.14.4.tgz",
......@@ -19135,6 +19216,11 @@
"es5-ext": "~0.10.2"
}
},
"luxon": {
"version": "2.1.1",
"resolved": "https://g.civnet.cn:4873/luxon/-/luxon-2.1.1.tgz",
"integrity": "sha1-NAUvejOnmJdnY3vnz4C0fbJk/4g="
},
"make-dir": {
"version": "2.1.0",
"resolved": "https://g.civnet.cn:4873/make-dir/-/make-dir-2.1.0.tgz",
......@@ -27081,7 +27167,6 @@
"version": "0.2.2",
"resolved": "https://g.civnet.cn:4873/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
"integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
"dev": true,
"requires": {
"is-arrayish": "^0.3.1"
},
......@@ -27089,8 +27174,7 @@
"is-arrayish": {
"version": "0.3.2",
"resolved": "https://g.civnet.cn:4873/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
"dev": true
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
}
}
},
......@@ -27289,6 +27373,11 @@
}
}
},
"sortablejs": {
"version": "1.14.0",
"resolved": "https://g.civnet.cn:4873/sortablejs/-/sortablejs-1.14.0.tgz",
"integrity": "sha1-bS4XzL2yX0ZHNN9iHU811Ks1s9g="
},
"source-list-map": {
"version": "2.0.1",
"resolved": "https://g.civnet.cn:4873/source-list-map/-/source-list-map-2.0.1.tgz",
......@@ -29029,6 +29118,11 @@
"@babel/runtime": "^7.10.2"
}
},
"tabbable": {
"version": "5.2.1",
"resolved": "https://g.civnet.cn:4873/tabbable/-/tabbable-5.2.1.tgz",
"integrity": "sha1-4/2nNn3bsXLc2p+HHA/bNtHEzZw="
},
"table": {
"version": "5.4.6",
"resolved": "https://g.civnet.cn:4873/table/-/table-5.4.6.tgz",
// eslint-disable-next-line import/extensions
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
import React from 'react';
// eslint-disable-next-line import/extensions
import { ArcGISMap as MapComponent } from '@wisdom-map/arcgismap';
// import MapComponent from './lib/index.js';
// eslint-disable-next-line react/prefer-stateless-function
export default class ArcGISMap extends React.Component {
render() {
// arcgisConfig.assetsPath = `${window.location.origin
// }/${pkg.name.toLocaleLowerCase()}/assets`;
return <MapComponent {...this.props} />;
}
}
......@@ -669,10 +669,14 @@ const BasicLayout = props => {
}
{
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : !window.location.pathname.startsWith('/civbase/civweb4') ? <CreateBaseMap options={{ type: 'ArcgisMap' }} /> : null
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null
}
{
window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null
}
<div id="micro-container" className="subapp-container">
{/*<CreateBaseMap/>*/}
{/* <CreateBaseMap/> */}
{props.children}
</div>
{props.children}
......@@ -688,7 +692,12 @@ const BasicLayout = props => {
}
{
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : !window.location.pathname.startsWith('/civbase/civweb4') ? <CreateBaseMap options={{ type: 'ArcgisMap' }} /> : null
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null
}
{
window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap /> : null
}
<div id="micro-container" className="subapp-container">
{/*<CreateBaseMap/>*/}
......
/* eslint-disable */
import React from 'react';
import { Spin } from 'antd';
import { connect } from 'react-redux';
import { actionCreators } from '@/containers/App/store';
import _ from 'lodash';
// import { AMapScene } from '@wisdom-map/Amap';
import { ArcGISMap } from '@wisdom-map/arcgismap';
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
// import pkg from '../../../package.json';
// arcgisConfig.assetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`;
// window.arcgisAssetsPath = arcgisConfig.assetsPath;
class Map extends React.PureComponent {
constructor(props) {
super(props);
this.options = _.merge({}, props.options);
this.state = {
type: props.options.type,
loading: true,
options: this.transformMapsetting(window.globalConfig.mapsettings),
widgets: window.globalConfig.uiwidgets,
}
}
transformMapsetting(mapsettings) {
let layers = mapsettings.layers;
layers = layers.map(item => {
item.url = /^\//.test(item.url) ? `/${item.url}` : item.url;
return item;
})
return Object.assign({}, mapsettings, {
layers: layers
});
}
import MapComponent from '@/components/mapView';
destroyAMap() {
// const mapKey = [
// '_AMap_AMap.MapType',
// '_AMap_labelcanvas',
// '_AMap_imagelayer',
// '_AMap_anole',
// '_AMap_AMap.Scale',
// '_AMap_rbush',
// '_AMap_AMap.IndoorMap',
// '_AMap_AMap.CustomLayer',
// '_AMap_AMap.MarkerClusterer',
// '_AMap_vectorlayer',
// '_AMap_AMap.OverView',
// '_AMap_sync',
// '_AMap_AMap.PlaceSearch',
// '_AMap_AMap.DistrictSearch',
// '_AMap_Map3D',
// '_AMap_AMap.Autocomplete',
// '_AMap_AMap.Heatmap',
// '_AMap_wgl',
// '_AMap_overlay',
// '_AMap_cvector',
// '_AMap_AMap.ToolBar',
// '_AMap_mouse',
// '_AMap_AMap.RangingTool',
// '_AMap_data.tileKeys'
// ];
// // eslint-disable-next-line no-plusplus
// for (let i = 0; i < mapKey.length; i++) {
// localStorage.removeItem(mapKey[i]);
// }
// delete window.AMap;
// delete window.AMapUI;
// delete window.AMapUI_DEBUG;
}
componentWillMount() {
// this.destroyAMap()
}
getAMap(AMapObj, AMap) {
// this.props.updageMapView({
// AMapObj,
// AMap
// });
}
getArcGISMap(map) {
this.props.updageMapView(map);
}
show() {
}
hide() {
// import style from './baseMapPage.less';
class CreateMap extends React.Component {
constructor(props) {
super(props);
this.mapManganerRef = React.createRef();
}
destroy() {
state = {
loading: true,
config: window.globalConfig.mapsettings,
widgets: window.globalConfig.uiwidgets,
};
}
getView = view => {
this.props.updageMapView(view);
};
render() {
return (
<>
{
this.state.type === 'AMap' ? (
<div {...this.state} getMapInfo={this.getAMap.bind(this)} />
) : (
<ArcGISMap config={this.state.options} getMapInfo={this.getArcGISMap.bind(this)} />
)
}
<MapComponent {...this.state} getMapInfo={this.getView} />
</>
)
);
}
}
const mapStateToProps = state => ({});
const mapDispatchToProps = dispatch => ({
......@@ -120,4 +43,4 @@ const mapDispatchToProps = dispatch => ({
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Map);
)(CreateMap);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment