Commit 90a4b27a authored by 邓超's avatar 邓超

fix: 添加底图插件

parent 2c93dee5
Pipeline #52132 waiting for manual action with stages
......@@ -30,7 +30,7 @@ const defaultMap = {
icon: '',
layerType: 'amap-v',
url: '',
opacity: 0.56,
opacity: 1,
visible: false,
useProxy: false,
proxyUrl: '',
......@@ -73,7 +73,44 @@ const defaultMap = {
boundWidth: '10px',
backgroundOpacity: '0.6',
};
const widgets = [
{
label: '缩放',
right: 20,
bottom: 130,
config: {},
},
{
label: '坐标',
left: 20,
bottom: 20,
config: {},
},
{
label: '比例尺',
left: 60,
bottom: 70,
config: {},
},
{
label: '复位',
right: 20,
bottom: 90,
config: {},
},
{
label: '图层',
right: 20,
bottom: 50,
config: {},
},
{
label: '底图切换',
right: 60,
bottom: 45,
config: {},
},
];
const Map = props => {
const { visible, onCancel, schemename } = props;
const [form] = Form.useForm();
......@@ -93,6 +130,7 @@ const Map = props => {
const [flag, setFlag] = useState(0);
const mapRef = useRef();
const mapInfo = useRef(null);
useEffect(() => {
GetWebSiteConfig({ client: 'sandbox' }).then(res => {
console.log(res.data[0].mapsettings, 'res.data[0].mapsettings');
......@@ -363,7 +401,12 @@ const Map = props => {
</div>
<div className={styles.mapBox}>
{canLoadMap && (
<ArcGISMap ref={mapRef} getMapInfo={e => getMapInfo(e)} config={mapsettings} />
<ArcGISMap
ref={mapRef}
getMapInfo={e => getMapInfo(e)}
config={mapsettings}
widgets={widgets}
/>
)}
</div>
</div>
......
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