qinbo
2021-09-16 370f6a62d6896c545371f8331ce1c98f6efd574b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
  "map3d": {
    "templateValues": {
      "dataServer": "//data.mars3d.cn",
      "gltfServerUrl": "//data.mars3d.cn/gltf"
    },
    "scene": {
      "center": { "lat": 31.162801, "lng": 121.543277, "alt": 50000, "heading": 359.2, "pitch": -39.5 },
      "scene3DOnly": false,
      "shadows": false,
      "removeDblClick": true,
      "sceneMode": 3,
      "showSun": true,
      "showMoon": true,
      "showSkyBox": true,
      "showSkyAtmosphere": true,
      "fog": true,
      "fxaa": true,
      "globe": {
        "depthTestAgainstTerrain": false,
        "baseColor": "#546a53",
        "showGroundAtmosphere": true,
        "enableLighting": false
      },
      "cameraController": {
        "zoomFactor": 3.0,
        "minimumZoomDistance": 1,
        "maximumZoomDistance": 50000000,
        "enableRotate": true,
        "enableTranslate": true,
        "enableTilt": true,
        "enableZoom": true,
        "enableCollisionDetection": true,
        "minimumCollisionTerrainHeight": 15000
      }
    },
    "control": {
      "homeButton": true,
      "baseLayerPicker": false,
      "sceneModePicker": true,
      "vrButton": false,
      "fullscreenButton": true,
      "navigationHelpButton": false,
      "animation": true,
      "timeline": false,
      "infoBox": false,
      "geocoder": false,
      "geocoderConfig": { "key": ["ae29a37307840c7ae4a785ac905927e0"] },
      "selectionIndicator": false,
 
      "defaultContextMenu": true,
      "mouseDownView": true,
      "compass": { "bottom": "240px", "right": "5px" },
      "distanceLegend": { "left": "100px", "bottom": "2px" },
      "locationBar": {
        "fps": false,
        "crs": "CGCS2000_GK_Zone_3",
        "crsDecimal": 0,
        "template": "<div>经度:{lng}</div> <div>纬度:{lat}</div> <div>横{crsx}  纵{crsy}</div> <div>海拔:{alt}米</div> <div>层级:{level}</div><div>方向:{heading}°</div> <div>俯仰角:{pitch}°</div><div>视高:{cameraHeight}米</div>"
      }
    },
    "terrain": {
      "url": "{dataServer}/terrain",
      "show": false
    },
    "basemaps": [
      { "id": 10, "name": "地图底图", "type": "group" },
      {
        "id": 2021,
        "pid": 10,
        "name": "天地图影像",
        "icon": "img/basemaps/tdt_img.png",
        "type": "group",
        "layers": [
          { "name": "底图", "type": "tdt", "layer": "img_d", "key": ["9ae78c51a0a28f06444d541148496e36"] }
        ],
        "show":true
      },
      {
        "pid": 10,
        "name": "天地图电子",
        "icon": "img/basemaps/tdt_vec.png",
        "type": "group",
        "layers": [
          { "name": "底图", "type": "tdt", "layer": "vec_d", "key": ["9ae78c51a0a28f06444d541148496e36"] }
        ]
      }
    ],
    "layers": [
      { "id": 50, "name": "辅助图层", "type": "group" },
      { "pid": 50, "type": "graticule", "name": "经纬网" },
      {
        "pid": 50,
        "name": "行政区划界线",
        "type": "xyz",
        "url": "https://t{s}.tianditu.gov.cn/DataServer?T=ibo_w&x={x}&y={y}&l={z}&tk=9ae78c51a0a28f06444d541148496e36",
        "subdomains": "01234567",
        "maximumLevel": 10,
        "mapSplit": false,
        "show": true
      },
      {
        "pid": 50,
        "name": "高德实时路况",
        "type": "gaode",
        "layer": "time",
        "minimumTerrainLevel": 4,
        "minimumLevel": 4,
        "proxy": "//server.mars3d.cn/proxy/",
        "mapSplit": false
      },
 
      { "id": 60, "name": "地形", "type": "group" },
      { "pid": 60, "type": "terrain", "name": "Cesium地形", "terrain": { "type": "ion" }, "radio": true },
      { "pid": 60, "type": "terrain", "name": "Mars3D地形", "terrain": { "type": "xyz", "url": "{dataServer}/terrain" }, "radio": true },
      {
        "pid": 60,
        "type": "terrain",
        "name": "ArcGIS地形",
        "terrain": { "type": "arcgis", "url": "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer" },
        "radio": true
      },
      { "pid": 60, "type": "terrain", "name": "无地形", "terrain": { "type": "none" }, "radio": true },
 
      {
        "pid": 2040,
        "type": "geojson",
        "name": "上海道路",
        "url": "data/roads-gcj.json",
        "symbol": {
          "styleOptions": {
            "color": "#ffffff",
            "width": 2,
            "opacity": 0.8,
            "label": {
              "text": "{name}",
              "position": "center",
              "font_size": 30,
              "color": "#ffffff",
              "outline": true,
              "outlineColor": "#000000",
              "scaleByDistance": true,
              "scaleByDistance_far": 60000000,
              "scaleByDistance_farValue": 0.2,
              "scaleByDistance_near": 1000000,
              "scaleByDistance_nearValue": 1,
              "distanceDisplayCondition": true,
              "distanceDisplayCondition_far": 12000000,
              "distanceDisplayCondition_near": 0
            }
          }
        },
        "show": false,
        "flyTo": true
      },
     
      { "id": 2040, "pid": 20, "name": "城市白模", "type": "group" }, 
      {
        "id": 204012,
        "pid": 2040,
        "type": "3dtiles",
        "name": "上海市区",
        "url": "{dataServer}/3dtiles/jzw-shanghai/tileset.json",
        "maximumScreenSpaceError": 4,
        "maximumMemoryUsage": 1024,
        "style": {
          "color": {
            "conditions": [
              ["${floor} >= 200", "rgba(45, 0, 75, 0.5)"],
              ["${floor} >= 100", "rgb(170, 162, 204)"],
              ["${floor} >= 50", "rgb(224, 226, 238)"],
              ["${floor} >= 25", "rgb(252, 230, 200)"],
              ["${floor} >= 10", "rgb(248, 176, 87)"],
              ["${floor} >= 5", "rgb(198, 106, 11)"],
              ["true", "rgb(127, 59, 8)"]
            ]
          }
        },
        "highlight": { "type": "click", "color": "#FFFF00" },
        "popup": [
          { "field": "name", "name": "名称" },
          { "field": "floor", "name": "楼层" }
        ],
        "center": { "lat": 31.257341, "lng": 121.466139, "alt": 2170.8, "heading": 122.2, "pitch": -31.8 }
      },
     
      { "id": 99, "name": "数据图层", "type": "group" },
      { "id": 1006, "pid": 99, "name": "监测区域", "type": "group" }
    ]
  }
}