Commit c29de16e authored by yzl's avatar yzl

- 调整基座webgis子应用地图显示

parent bdb087c5
Pipeline #48589 skipped with stages
This diff is collapsed.
...@@ -3,6 +3,7 @@ import { AMapScene } from '@wisdom-map/Amap'; ...@@ -3,6 +3,7 @@ import { AMapScene } from '@wisdom-map/Amap';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { store } from '@wisdom-utils/utils'; import { store } from '@wisdom-utils/utils';
import { actionCreators } from '../../../containers/App/store'; import { actionCreators } from '../../../containers/App/store';
const AMap = props => { const AMap = props => {
const getMap = (obj, current) => { const getMap = (obj, current) => {
store.set('amapView', { store.set('amapView', {
...@@ -14,10 +15,15 @@ const AMap = props => { ...@@ -14,10 +15,15 @@ const AMap = props => {
map: current, map: current,
}); });
}; };
const mapOptions = { const mapOptions = {
config: props.global.mapsettings, config: window.globalConfig.mapsettings,
theme: 'amap://styles/74fae00a851749793870b658f9f22d55', theme: 'amap://styles/74fae00a851749793870b658f9f22d55',
mapOptions: {
plugins: ['AMap.MarkerClusterer'],
},
}; };
return ( return (
<div <div
style={{ style={{
...@@ -32,9 +38,9 @@ const AMap = props => { ...@@ -32,9 +38,9 @@ const AMap = props => {
</div> </div>
); );
}; };
const mapStateToProps = state => ({ const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']), global: state.getIn(['global', 'globalConfig']),
amapView: state.getIn(['global', 'amapView']),
}); });
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = dispatch => ({
......
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