cd-mapgis 1.1.19 → 1.1.20
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 +8 -12
package/package.json
CHANGED
package/src/OM.js
CHANGED
|
@@ -50,8 +50,8 @@ export default class OM {
|
|
|
50
50
|
* @param {*} key
|
|
51
51
|
*/
|
|
52
52
|
static getDic(key) {
|
|
53
|
-
console.log('window.location.hostname',window.location.hostname);
|
|
54
|
-
console.log('window.location.href',window.location.href);
|
|
53
|
+
console.log('window.location.hostname', window.location.hostname);
|
|
54
|
+
console.log('window.location.href', window.location.href);
|
|
55
55
|
const hostname = OM.getIp(window.location.href);
|
|
56
56
|
return OM.post("/map/getDic", { dicKey: key, clientIp: hostname });
|
|
57
57
|
}
|
|
@@ -254,16 +254,12 @@ export default class OM {
|
|
|
254
254
|
}
|
|
255
255
|
postRes = await OM.checkPushLayers({ layers: _layers });
|
|
256
256
|
let pushLayers = postRes.data ? postRes.data : [];
|
|
257
|
-
for (let
|
|
258
|
-
|
|
259
|
-
let
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
map.addLayer(layer);
|
|
264
|
-
mapView.viewLayers.push({ type: 'geoLayer', name: layerNames[geoParam.name], layer: layer });
|
|
265
|
-
mapView.geoServerLayers.push(geoParam.name);
|
|
266
|
-
}
|
|
257
|
+
for (let i = 0; i < pushLayers.length; i++) {
|
|
258
|
+
geoParam.name = pushLayers[i];
|
|
259
|
+
let layer = LayerUtil.geoServerWmsLayer(geoParam);
|
|
260
|
+
map.addLayer(layer);
|
|
261
|
+
mapView.viewLayers.push({ type: 'geoLayer', name: layerNames[geoParam.name], layer: layer });
|
|
262
|
+
mapView.geoServerLayers.push(geoParam.name);
|
|
267
263
|
}
|
|
268
264
|
}
|
|
269
265
|
//再加载geoServer接口图层
|