|
@@ -1,4 +1,4 @@
|
|
|
-<!DOCTYPE html>
|
|
|
+<!DOCTYPE html>
|
|
|
<html lang="zh-cn">
|
|
|
<head>
|
|
|
<meta charset="utf-8" />
|
|
@@ -306,7 +306,7 @@
|
|
|
// 图层初始化完成事件
|
|
|
on(map, "AGSLayerInited", function (agsLayer) {
|
|
|
locateByDepName(depName);
|
|
|
- hideLayers();
|
|
|
+ hideAllLayers();
|
|
|
// 创建空间引用
|
|
|
app.sr = new SpatialReference(4326);
|
|
|
|
|
@@ -581,6 +581,17 @@
|
|
|
var layerNames = ["矿权"];
|
|
|
setLayerVisible(layerNames, false);
|
|
|
}
|
|
|
+ // 隐藏所有图层
|
|
|
+ function hideAllLayers() {
|
|
|
+ var all = ["井", "煤层气井",
|
|
|
+ "变电所", "联合站", "处理厂", "接转站", "脱水站", "增压站", "卸油站", "计量站(间)", "集油阀组间", "采油站",
|
|
|
+ "井网管道-油", "站间管道-油", "外输管线-油", "掺稀油管道",
|
|
|
+ "站库面", "配电线",
|
|
|
+ "厂边界", "矿边界",
|
|
|
+ "矿权"
|
|
|
+ ];
|
|
|
+ setLayerVisible(all, false);
|
|
|
+ }
|
|
|
// 设置图层显示
|
|
|
function setLayerVisible(layerNames, flag) {
|
|
|
console.log('layerNames', layerNames);
|