Commit 3f7ef70e authored by lihonglin's avatar lihonglin

feat: arcgis

parent 591c803b
...@@ -36,7 +36,8 @@ module.exports = { ...@@ -36,7 +36,8 @@ module.exports = {
type: 'none', type: 'none',
exclude: [ exclude: [
'@wisdom-map/arcgismap', '@wisdom-map/arcgismap',
'@wisdom-map/arcgismap/lib/arcgisapi', '@wisdom-map/Amap',
'@wisdom-map/Map',
'swagger-ui-react', 'swagger-ui-react',
'Cesium' 'Cesium'
], ],
......
...@@ -30,12 +30,12 @@ export default { ...@@ -30,12 +30,12 @@ export default {
origin: `//127.0.0.1:8345` origin: `//127.0.0.1:8345`
} }
}, },
// { {
// name: 'civ_webgis', name: 'civ_webgis',
// entry: `//${window.location.hostname}:8080/civ_webgis`, entry: `//${window.location.hostname}:8081/civ_webgis`,
// container: '#micro-container', container: '#micro-container',
// activeRule: '/civbase/civ_energy', activeRule: '/civbase/civ_webgis',
// }, },
{ {
name: 'civweb4', name: 'civweb4',
entry: `//${window.location.hostname}:3020/civweb4`, entry: `//${window.location.hostname}:3020/civweb4`,
......
...@@ -18,7 +18,9 @@ const TYPE_ALL_EXCLUDE = [ ...@@ -18,7 +18,9 @@ const TYPE_ALL_EXCLUDE = [
'lodash', 'lodash',
'react', 'react',
'react-dom', 'react-dom',
'@wisdom-map/arcgismap' '@wisdom-map/arcgismap',
'@wisdom-map/Amap',
'@wisdom-map/Map',
]; ];
......
...@@ -102,7 +102,9 @@ ...@@ -102,7 +102,9 @@
"@wisdom-cesium/cesium": "^1.0.64", "@wisdom-cesium/cesium": "^1.0.64",
"@wisdom-components/basictable": "^1.5.16", "@wisdom-components/basictable": "^1.5.16",
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-map/arcgismap": "^1.0.60-0", "@wisdom-map/Amap": "^1.0.49-3",
"@wisdom-map/Map": "^1.0.12-9",
"@wisdom-map/arcgismap": "^1.0.79-9",
"@wisdom-map/util": "^1.0.27-0", "@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.0.14", "@wisdom-utils/components": "0.0.14",
"@wisdom-utils/runtime": "0.0.15", "@wisdom-utils/runtime": "0.0.15",
......
...@@ -43,6 +43,8 @@ import { actionCreators } from '@/containers/App/store'; ...@@ -43,6 +43,8 @@ import { actionCreators } from '@/containers/App/store';
import KeepAlive from 'react-activation' import KeepAlive from 'react-activation'
// import CreateBaseMap from '@/pages/map'; // import CreateBaseMap from '@/pages/map';
import CreateBaseMap from '@/pages/map';
// import Authorized from '@/utils/Authorized'; // import Authorized from '@/utils/Authorized';
import { findPathByLeafId, getBaseName } from '@/utils/utils'; import { findPathByLeafId, getBaseName } from '@/utils/utils';
// import { renderRoutes } from 'react-router-config'; // import { renderRoutes } from 'react-router-config';
...@@ -685,7 +687,7 @@ const BasicLayout = props => { ...@@ -685,7 +687,7 @@ const BasicLayout = props => {
} }
{ {
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap options={{ type: 'ArcgisMap' }}/> : null
} }
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
...@@ -705,7 +707,7 @@ const BasicLayout = props => { ...@@ -705,7 +707,7 @@ const BasicLayout = props => {
} }
{ {
window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : null window.location.pathname.startsWith('/civbase/civ_3d') ? <KeepAlive><CesiumMap /></KeepAlive> : window.location.pathname.startsWith('/civbase/civ_webgis') ? <CreateBaseMap options={{ type: 'ArcgisMap' }}/> : null
} }
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
{/*<CreateBaseMap/>*/} {/*<CreateBaseMap/>*/}
......
...@@ -300,6 +300,10 @@ window.app.define('@wisdom-utils/components', require.context('../node_modules/@ ...@@ -300,6 +300,10 @@ window.app.define('@wisdom-utils/components', require.context('../node_modules/@
/** /**
* arcgismap * arcgismap
*/ */
window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-map/Amap', require.context('../node_modules/@wisdom-map/Amap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-map/Map', require.context('../node_modules/@wisdom-map/Map/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js'); // window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// // window.app.define('@wisdom-map/arcgismap/lib/widgets', require.context('../node_modules/@wisdom-map/arcgismap/lib/widgets', true, /^.\/(lib\/)?[^\/]+\.js$/)); // // window.app.define('@wisdom-map/arcgismap/lib/widgets', require.context('../node_modules/@wisdom-map/arcgismap/lib/widgets', true, /^.\/(lib\/)?[^\/]+\.js$/));
// window.app.define('@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core', require.context('../node_modules/@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core', true, /^.\/(arcgisapi\/)?[^\/]+\.js$/)); // window.app.define('@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core', require.context('../node_modules/@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core', true, /^.\/(arcgisapi\/)?[^\/]+\.js$/));
......
...@@ -4,7 +4,7 @@ import { connect } from 'react-redux'; ...@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import _ from 'lodash'; import _ from 'lodash';
// import { AMapScene } from '@wisdom-map/Amap'; // import { AMapScene } from '@wisdom-map/Amap';
// import { ArcGISMap } from '@wisdom-map/arcgismap'; import { ArcGISMap } from '@wisdom-map/arcgismap';
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config'; // import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
// import pkg from '../../../package.json'; // import pkg from '../../../package.json';
// arcgisConfig.assetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`; // arcgisConfig.assetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`;
...@@ -22,14 +22,14 @@ class Map extends React.PureComponent { ...@@ -22,14 +22,14 @@ class Map extends React.PureComponent {
} }
transformMapsetting(mapsettings) { transformMapsetting(mapsettings) {
// let layers = mapsettings.layers; let layers = mapsettings.layers;
// layers = layers.map(item => { layers = layers.map(item => {
// item.url = /^\//.test(item.url) ? `/${item.url}`: item.url; item.url = /^\//.test(item.url) ? `/${item.url}`: item.url;
// return item; return item;
// }) })
// return Object.assign({}, mapsettings, { return Object.assign({}, mapsettings, {
// layers: layers layers: layers
// }); });
} }
destroyAMap() { destroyAMap() {
...@@ -80,7 +80,7 @@ class Map extends React.PureComponent { ...@@ -80,7 +80,7 @@ class Map extends React.PureComponent {
} }
getArcGISMap(map) { getArcGISMap(map) {
// this.props.updageMapView(map); this.props.updageMapView(map);
} }
show() { show() {
...@@ -96,17 +96,17 @@ class Map extends React.PureComponent { ...@@ -96,17 +96,17 @@ class Map extends React.PureComponent {
} }
render() { render() {
// return ( return (
// <> <>
// { {
// this.state.type === 'AMap' ? ( this.state.type === 'AMap' ? (
// <div {...this.state} getMapInfo={this.getAMap.bind(this)}/> <div {...this.state} getMapInfo={this.getAMap.bind(this)}/>
// ) : ( ) : (
// <ArcGISMap config={this.state.options} getMapInfo={this.getArcGISMap.bind(this)}/> <ArcGISMap config={this.state.options} getMapInfo={this.getArcGISMap.bind(this)}/>
// ) )
// } }
// </> </>
// ) )
} }
} }
const mapStateToProps = state => ({}); const mapStateToProps = state => ({});
......
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