cd-mapgis 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/OM.js +5 -1
package/package.json
CHANGED
package/src/OM.js
CHANGED
|
@@ -136,8 +136,12 @@ export default class OM {
|
|
|
136
136
|
//直接加载固定的geoServer图层
|
|
137
137
|
let geoLayerUrl = layerHost["geoServer"];
|
|
138
138
|
if (p.geoLayer) {
|
|
139
|
+
let temp1 = await OM.getDic("geoserver");
|
|
140
|
+
let geoserverDic = temp1.data ? JSON.parse(temp1.data) : {};
|
|
139
141
|
let geoLayer = p.geoLayer;
|
|
140
|
-
let
|
|
142
|
+
let workspace = geoLayer.workspace ? geoLayer.workspace : geoserverDic.workspace;
|
|
143
|
+
let url = geoLayer.wmsUrl ? geoLayer.wmsUrl : geoserverDic.url + '/' + geoserverDic.workspace + '/wms';
|
|
144
|
+
let geoParam = { workspace: workspace, url: url };
|
|
141
145
|
if (geoLayerUrl) {
|
|
142
146
|
let index = geoParam.url.indexOf('/geoserver');
|
|
143
147
|
geoParam.url = geoLayerUrl + geoParam.url.substr(index);
|