Commit 049dfc13 authored by 皮倩雯's avatar 皮倩雯

fix: '地图配置新增底图'

parent 83c807cd
Pipeline #53865 passed with stages
......@@ -97,6 +97,14 @@ const AddModal = props => {
}),
};
} else {
let url = '';
if (obj.type == 'streetPurplishBlue') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer';
} else if (obj.type == 'streetGray') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer';
} else if (obj.type == 'streetWarm') {
url = '//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer';
}
arr = {
servicename: obj.servicename,
terminalType: 'base',
......@@ -104,7 +112,7 @@ const AddModal = props => {
jsonCfg: JSON.stringify({
alpha: alpha,
label: obj.label,
url: obj.url,
url: url,
icon: obj.icon,
type: obj.type,
}),
......@@ -168,6 +176,7 @@ const AddModal = props => {
break;
case 'edit':
console.log(formObj);
form.setFieldsValue({ ...formObj });
let index = formObj.icon.lastIndexOf('/');
let str = formObj.icon.substring(index + 1, formObj.icon.length);
......@@ -322,6 +331,12 @@ const AddModal = props => {
return '天地图影像';
case 'tianditu-v-va':
return '天地图地形';
case 'streetPurplishBlue':
return 'GeoQ午夜蓝';
case 'streetGray':
return 'GeoQ水墨灰';
case 'streetWarm':
return 'GeoQ暖色';
// case 'google-user':
// return;
// case 'pipenet-tile':
......@@ -510,6 +525,9 @@ const AddModal = props => {
<Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option>
<Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option>
<Option value="google-user">自定义底图(google-user)</Option>
<Option value="streetPurplishBlue">GeoQ午夜蓝(streetPurplishBlue)</Option>
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
</Select>
</Item>
<Item
......
......@@ -180,6 +180,7 @@ const NewEditModal = props => {
switch (type) {
case 'edit':
console.log(formObj);
form.setFieldsValue({
...formObj,
IP: formObj.m_Ip,
......@@ -192,6 +193,7 @@ const NewEditModal = props => {
User: formObj.m_User,
Pwd: formObj.m_Pwd,
workSpance: aa,
// type: `${formObj.servicename}(${formObj.type})`,
});
let index = formObj.icon.lastIndexOf('/');
console.log(index);
......@@ -482,6 +484,9 @@ const NewEditModal = props => {
<Option value="tianditu-i-ia">天地图影像(tianditu-i-ia)</Option>
<Option value="pipenet-tile">矢量底图切片(pipenet-tile)</Option>
<Option value="google-user">自定义底图(google-user)</Option>
<Option value="streetPurplishBlue">GeoQ午夜蓝(streetPurplishBlue)</Option>
<Option value="streetGray">GeoQ水墨灰(streetGray)</Option>
<Option value="streetWarm">GeoQ暖色(streetWarm)</Option>
</Select>
</Item>
<Item
......
......@@ -92,8 +92,8 @@ const AddModal = props => {
const onFinish = value => {};
useEffect(() => {
console.log(keepData);
if (visible) {
console.log(keepData);
switch (type) {
case 'add':
addTile();
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-06-10 15:13:28
* @LastEditTime: 2022-06-22 11:56:59
* @LastEditors: leizhe
*/
/* eslint-disable indent */
......@@ -46,18 +46,21 @@ const VectorData = props => {
terminalType: 'scheme',
isBaseMap: false,
}).then(resdata => {
if (resdata.msg === 'Ok') {
console.log(123);
if (resdata.code == 0) {
console.log(333);
setTreeLoading(false);
GettMaplayer({ terminalType: 'base', isBaseMap: true }).then(res => {
if (res.msg === 'Ok') {
if (res.code == 0) {
console.log(666);
let arr = [];
res.data.general.baseMap.layers.map(i => {
console.log(i);
arr.push(i.servicename);
});
console.log(arr);
setKeepData(arr);
resdata.data.scheme.optionalLayer.layers.map((j, index) => {
let arr = [];
res.data.general.baseMap.layers.map(i => {
console.log(i);
arr.push(i.servicename);
});
console.log(arr);
setKeepData(arr);
let data = [];
let aa = [];
j.baseMap.map(k => {
......@@ -77,6 +80,7 @@ const VectorData = props => {
}
});
} else {
console.log(3456);
setTreeLoading(false);
}
});
......
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