Newer
Older
DH_Apicture / public / static / libs / mapbox / style / xinyang.json
@zhangqy zhangqy on 29 Nov 16 KB first commit
  1. {
  2. "params": {
  3. "basemap": "https://supermap2.wh-nf.cn:8090/bm",
  4. "mvt": "https://supermap0.wh-nf.cn:8090/vt",
  5. "sprites": [
  6. "/static/libs/mapbox/style/sprite/sprite4"
  7. ],
  8. "init": {
  9. "center": [
  10. 114.1348766974395,
  11. 32.13819159443703
  12. ],
  13. "zoom": 13.15,
  14. "pitch": 55,
  15. "style": "/static/libs/mapbox/mapbox-street-style.json"
  16. },
  17. "l7": {
  18. "images": [
  19. {
  20. "name": "02",
  21. "url": "https://gw.alipayobjects.com/zos/bmw-prod/ce83fc30-701f-415b-9750-4b146f4b3dd6.svg"
  22. },
  23. {
  24. "name": "map_selected",
  25. "url": "/static/libs/mapbox/style/sprite/map_selected.png"
  26. }
  27. ]
  28. }
  29. },
  30. "ogc": [
  31. {
  32. "id": "newfiber-XYZLayer",
  33. "type": "XYZLayer",
  34. "params": {
  35. "id": "newfiber-XYZLayer",
  36. "url": "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=a603e07a17766447f9e74f14c5454efa",
  37. "subdomains": [
  38. "0",
  39. "1",
  40. "2",
  41. "3",
  42. "4",
  43. "5",
  44. "6",
  45. "7"
  46. ],
  47. "minZoom": 1,
  48. "maxZoom": 17,
  49. "tileType": ""
  50. },
  51. "methods": [
  52. {
  53. "name": "addTo",
  54. "params": [
  55. "''||map"
  56. ]
  57. },
  58. {
  59. "name": "hide",
  60. "params": []
  61. }
  62. ]
  63. },
  64. {
  65. "id": "newfiber-WMTSLayer",
  66. "type": "WMTSLayer",
  67. "params": {
  68. "id": "newfiber-WMTSLayer",
  69. "url": "https://t{s}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=5095c97223409ac114493d71ecb9cd87",
  70. "subdomains": [
  71. "0",
  72. "1",
  73. "2",
  74. "3",
  75. "4",
  76. "5",
  77. "6",
  78. "7"
  79. ]
  80. },
  81. "methods": []
  82. },
  83. {
  84. "id": "newfiber-CanvasLayer",
  85. "type": "CanvasLayer",
  86. "params": {
  87. "id": "newfiber-CanvasLayer",
  88. "bbox": [
  89. 110.98300209463804,
  90. 32.415967161418266,
  91. 111.34992583909221,
  92. 32.599933881244255
  93. ],
  94. "width": 3000,
  95. "height": 1172,
  96. "images": "''||Array(16).fill().map((i,idx)=> `https://server1.wh-nf.cn:9000/newfiber-standard/2024/01/06/step${idx+1}.png`)"
  97. },
  98. "methods": []
  99. },
  100. {
  101. "id": "newfiber-WMSLayer",
  102. "type": "WMSLayer",
  103. "params": {
  104. "id": "newfiber-WMSLayer",
  105. "url": "http://server1.wh-nf.cn:8023/geoserver/xiaoganMapServer/wms",
  106. "layers": "xiaoganMapServer:GKFQ1"
  107. },
  108. "methods": []
  109. }
  110. ],
  111. "l7": [
  112. {
  113. "id": "hn_xy_hm_water",
  114. "key": "水系分布",
  115. "type": "PolygonLayer",
  116. "show": false,
  117. "params": {
  118. "autoFit": false,
  119. "zIndex": 0
  120. },
  121. "methods": [
  122. {
  123. "name": "shape",
  124. "params": [
  125. "water"
  126. ]
  127. },
  128. {
  129. "name": "color",
  130. "params": [
  131. "#58c3e0"
  132. ]
  133. },
  134. {
  135. "name": "style",
  136. "params": [
  137. {
  138. "speed":0.1
  139. }
  140. ]
  141. },
  142. {
  143. "name": "animate",
  144. "params": [
  145. true
  146. ]
  147. }
  148. ]
  149. },
  150. {
  151. "id": "hn_xy_hm_buildings",
  152. "key": "地形地貌",
  153. "type": "CityBuildingLayer",
  154. "show": false,
  155. "params": {"zIndex": 0},
  156. "methods": [
  157. {"name": "size", "params": ["height"]},
  158. {"name": "color", "params": ["rgba(242,246,250,1.0)"]},
  159. {
  160. "name": "animate",
  161. "params": [{"enable": true}
  162. ]
  163. },
  164. {
  165. "name": "active",
  166. "params": [{"color": "#0ff", "mix": 0.5}
  167. ]
  168. },
  169. {
  170. "name": "style",
  171. "params": [
  172. {
  173. "opacity": 0.7,
  174. "baseColor": "rgb(16, 16, 16)",
  175. "windowColor": "rgb(30, 60, 89)",
  176. "brightColor": "rgb(255, 176, 38)",
  177. "sweep": {
  178. "enable": true,
  179. "sweepRadius": 2,
  180. "sweepColor": "#1990FF",
  181. "sweepSpeed": 0.5,
  182. "sweepCenter": [114.11585273555961,32.144064990289394]
  183. }
  184. }
  185. ]
  186. }
  187. ],
  188. "columns": "height"
  189. },
  190. {
  191. "id": "hn_xy_hm_boundary",
  192. "key": "建成区",
  193. "type": "LineLayer",
  194. "show": false,
  195. "params": {"zIndex": 0},
  196. "methods": [
  197. {"name": "shape", "params": ["wall"]},
  198. {"name": "size", "params": [55]},
  199. {"name": "style", "params": [{"heightfixed": true, "opacity": 0.6, "sourceColor": "rgba(255,0,0,1)", "targetColor": "rbga(255,255,255, 0.2)"}]}
  200. ]
  201. },
  202. {
  203. "id": "hn_xy_hm_road",
  204. "key": "hn_xy_hm_road",
  205. "type": "LineLayer",
  206. "show": false,
  207. "params": {
  208. "autoFit": false,
  209. "zIndex": 10
  210. },
  211. "methods": [
  212. {
  213. "name": "shape",
  214. "params": [
  215. "line"
  216. ]
  217. },
  218. {
  219. "name": "color",
  220. "params": [
  221. "fclass",
  222. "''||function(v){\n let key = [\"trunk\", \"footway\", \"secondary\", \"trunk_link\", \"tertiary\", \"secondary_link\", \"tertiary_link\", \"living_street\", \"pedestrian\", \"primary\", \"residential\", \"track\", \"primary_link\", \"motorway_link\", \"motorway\", \"service\", \"unclassified\", \"path\"];\n let colors = ['#F9D371', '#3DB2FF', '#6E85B2', '#F47340', '#F6A9A9', '#EF2F88', '#5F7A61', '#1ee3cf', '#C2F784', '#FFF89A', 'rgba(22, 119, 255, .5)', '#93FFD8', '#BAFFB4', '#D3DEDC', '#AEFEFF', '#9B0000', '#F5F5F5', '#08ffc8', '#FFE3E3'];\n return colors[key.indexOf(v)];\n }"
  223. ]
  224. },
  225. {
  226. "name": "style",
  227. "params": [
  228. {
  229. "watercolor": "#6D99A8"
  230. }
  231. ]
  232. },
  233. {
  234. "name": "animate",
  235. "params": [
  236. {
  237. "interval": 1,
  238. "duration": 1,
  239. "trailLength": 2
  240. }
  241. ]
  242. }
  243. ],
  244. "columns": "fclass"
  245. },
  246. {
  247. "id": "hn_xy_hm_gw_gx",
  248. "key": "pipeline_info_flow",
  249. "type": "LineLayer",
  250. "show": false,
  251. "params": {
  252. "autoFit": false,
  253. "zIndex": 1
  254. },
  255. "methods": [
  256. {"name": "size", "params": [3]},
  257. {"name": "shape", "params": ["line"]},
  258. {"name": "texture", "params": ["02"]},
  259. {
  260. "name": "color",
  261. "params": ["pipe_type", "''||function(v){\n let key = [\"雨水\", \"污水\", \"合流\"];\n let colors = ['#184375', '#E6061A', '#ccff12'];\n return colors[key.indexOf(v)];\n }"]
  262. },
  263. {"name": "animate","params": [{"interval": 1, "duration": 1, "trailLength": 2}]},
  264. {"name": "style", "params": [{"opacity": 0.6, "lineTexture": true, "iconStep": 10, "borderWidth": 0.4, "borderColor": "#fff"}]}
  265. ],
  266. "columns": "pipe_type"
  267. },
  268. {
  269. "id": "",
  270. "key": "highlight_linestring",
  271. "type": "LineLayer",
  272. "show": true,
  273. "params": {
  274. "autoFit": false,
  275. "zIndex": 1
  276. },
  277. "methods": [
  278. {
  279. "name": "size",
  280. "params": [
  281. 3
  282. ]
  283. },
  284. {
  285. "name": "shape",
  286. "params": [
  287. "line"
  288. ]
  289. },
  290. {
  291. "name": "texture",
  292. "params": [
  293. "02"
  294. ]
  295. },
  296. {
  297. "name": "color",
  298. "params": ["pipe_type", "''||function(v){\n let key = [\"雨水\", \"污水\", \"合流\"];\n let colors = ['#184375', '#E6061A', '#ccff12'];\n return colors[key.indexOf(v)];\n }"]
  299. },
  300. {
  301. "name": "animate",
  302. "params": [
  303. {
  304. "interval": 1,
  305. "duration": 1,
  306. "trailLength": 2
  307. }
  308. ]
  309. },
  310. {
  311. "name": "style",
  312. "params": [
  313. {
  314. "opacity": 0.6,
  315. "lineTexture": true,
  316. "iconStep": 10,
  317. "borderWidth": 0.4,
  318. "borderColor": "#fff"
  319. }
  320. ]
  321. }
  322. ]
  323. },
  324. {
  325. "id": "",
  326. "key": "highlight_point1",
  327. "type": "PointLayer",
  328. "show": true,
  329. "params": {
  330. "zIndex": 0,
  331. "blend": "additive"
  332. },
  333. "methods": [
  334. {
  335. "name": "shape",
  336. "params": [
  337. "circle"
  338. ]
  339. },
  340. {
  341. "name": "color",
  342. "params": [
  343. "rgba(255,0,0,1.0)"
  344. ]
  345. },
  346. {
  347. "name": "size",
  348. "params": [
  349. 10
  350. ]
  351. },
  352. {
  353. "name": "animate",
  354. "params": [
  355. true
  356. ]
  357. },
  358. {
  359. "name": "style",
  360. "params": [
  361. {
  362. "unit": "meter"
  363. }
  364. ]
  365. }
  366. ]
  367. },
  368. {
  369. "id": "",
  370. "key": "highlight_point",
  371. "type": "PointLayer",
  372. "show": true,
  373. "params": {
  374. "zIndex": 0,
  375. "blend": "additive"
  376. },
  377. "methods": [
  378. {
  379. "name": "shape",
  380. "params": [
  381. "map_selected"
  382. ]
  383. },
  384. {
  385. "name": "size",
  386. "params": [
  387. 30
  388. ]
  389. },
  390. {
  391. "name": "style",
  392. "params": [
  393. {
  394. "offsets": [
  395. 0,
  396. 0
  397. ]
  398. }
  399. ]
  400. }
  401. ]
  402. },
  403. {
  404. "id": "",
  405. "key": "highlight_polygon",
  406. "type": "LineLayer",
  407. "show": true,
  408. "params": {
  409. "zIndex": 0
  410. },
  411. "methods": [
  412. {
  413. "name": "shape",
  414. "params": [
  415. "wall"
  416. ]
  417. },
  418. {
  419. "name": "size",
  420. "params": [
  421. 55
  422. ]
  423. },
  424. {
  425. "name": "style",
  426. "params": [
  427. {
  428. "heightfixed": true,
  429. "opacity": 0.6,
  430. "sourceColor": "rgba(255,0,0,1)",
  431. "targetColor": "rbga(255,255,255, 0)"
  432. }
  433. ]
  434. }
  435. ]
  436. }
  437. ],
  438. "mapbox": [
  439. {
  440. "id": "all_boundary",
  441. "key": "all_boundary",
  442. "source-layer": "all_boundary",
  443. "type": "line",
  444. "paint": {
  445. "line-color": "rgba(255,18,60,1)",
  446. "line-width": 1
  447. },
  448. "layout": {},
  449. "minzoom": 0,
  450. "maxzoom": 24,
  451. "mType": "mvt"
  452. },
  453. {
  454. "id": "pipeline_info",
  455. "key": "hn_xy_hm_gw_gx",
  456. "source-layer": "hn_xy_hm_gw_gx",
  457. "type": "line",
  458. "filter": ["in", "layer",""],
  459. "paint": {
  460. "line-color": [
  461. "match",
  462. ["get", "pipe_type"],
  463. "雨水", "#184375",
  464. "污水", "#E6061A",
  465. "合流", "#ccff12",
  466. "#000000"
  467. ],
  468. "line-width": [
  469. "match",
  470. [
  471. "get",
  472. "area_type"
  473. ],
  474. 1, 8,
  475. 2, 6,
  476. 3, 4,
  477. 4, 2,
  478. 2
  479. ]
  480. },
  481. "layout": {},
  482. "minzoom": 0,
  483. "maxzoom": 24,
  484. "mType": "mvt",
  485. "columns": "start_codi,end_coding,pipe_type,area_type,layer,st_asText(geometrys) as geometry"
  486. },
  487. {
  488. "id": "pipeline_point",
  489. "key": "hn_xy_hm_gw_gd",
  490. "source-layer": "hn_xy_hm_gw_gd",
  491. "type": "symbol",
  492. "filter": ["in", "layer", ""],
  493. "paint": {"text-color": "#333"},
  494. "layout": {
  495. "icon-image": [
  496. "match",
  497. ["get", "inspecti_2"],
  498. "雨水井", "ysj",
  499. "污水井", "wsj",
  500. "合流井", "hsj",
  501. "ysbz"
  502. ],
  503. "icon-size": 0.7,
  504. "text-field": "{inspecti_1}",
  505. "text-font": [
  506. "KlokanTech Noto Sans Regular"
  507. ],
  508. "text-size": 13,
  509. "text-line-height": 3,
  510. "text-anchor": "top"
  511. },
  512. "minzoom": 16,
  513. "maxzoom": 24,
  514. "mType": "mvt",
  515. "columns": "well_id,layer,inspecti_1,inspecti_2,st_asText(geometrys) as geometry"
  516. },
  517. {
  518. "id": "hn_xy_hm_gw_bz",
  519. "key": "hn_xy_hm_gw_bz",
  520. "source-layer": "hn_xy_hm_gw_bz",
  521. "filter": ["in", "layer", ""],
  522. "type": "symbol",
  523. "paint": {"text-color": "#333"},
  524. "layout": {
  525. "icon-image": "ysbz",
  526. "icon-size": 0.7,
  527. "text-field": "{rainwate_1}",
  528. "text-font": [
  529. "KlokanTech Noto Sans Regular"
  530. ],
  531. "text-size": 13,
  532. "text-line-height": 3,
  533. "text-anchor": "top"
  534. },
  535. "minzoom": 16,
  536. "maxzoom": 24,
  537. "mType": "mvt",
  538. "columns": "rainwate_1,layer,st_asText(geometrys) as geometry"
  539. },
  540. {
  541. "id": "hn_xy_hm_gw_pk",
  542. "key": "hn_xy_hm_gw_pk",
  543. "source-layer": "hn_xy_hm_gw_pk",
  544. "filter": ["in", "layer", ""],
  545. "type": "symbol",
  546. "paint": {"text-color": "#333"},
  547. "layout": {
  548. "icon-image": "paiKous",
  549. "icon-size": 0.7,
  550. "text-field": "{outlet_num}",
  551. "text-font": [
  552. "KlokanTech Noto Sans Regular"
  553. ],
  554. "text-size": 13,
  555. "text-line-height": 3,
  556. "text-anchor": "top"
  557. },
  558. "minzoom": 16,
  559. "maxzoom": 24,
  560. "mType": "mvt",
  561. "columns": "outlet_num,layer,st_asText(geometrys) as geometry"
  562. },
  563. {
  564. "id": "hn_xy_hm_psfq",
  565. "key": "hn_xy_hm_psfq",
  566. "source-layer": "hn_xy_hm_psfq",
  567. "type": "fill",
  568. "filter": [
  569. "in",
  570. "type",
  571. ""
  572. ],
  573. "paint": {
  574. "fill-color": ["get", "fill_color"],
  575. "fill-outline-color": ["get", "border_color"]
  576. },
  577. "layout": {},
  578. "minzoom": 10,
  579. "maxzoom": 24,
  580. "mType": "mvt",
  581. "columns": "type,name,border_color,fill_color,st_asText(geometrys) as geometry"
  582. },
  583. {
  584. "id": "行政分区",
  585. "key": "hn_xy_hm_xzqh",
  586. "source-layer": "hn_xy_hm_xzqh",
  587. "type": "fill",
  588. "paint": {
  589. "fill-color": ["get", "fill_color"],
  590. "fill-outline-color": ["get", "border_color"]
  591. },
  592. "layout": {
  593. "visibility": "none"
  594. },
  595. "minzoom": 10,
  596. "maxzoom": 24,
  597. "mType": "mvt",
  598. "columns": "type,name,border_color,fill_color,st_asText(geometrys) as geometry"
  599. },
  600. {
  601. "id": "point",
  602. "key": "point",
  603. "type": "symbol",
  604. "minzoom": 0,
  605. "maxzoom": 24,
  606. "filter": [
  607. "in",
  608. "type",
  609. ""
  610. ],
  611. "paint": {
  612. "text-color": "#333"
  613. },
  614. "layout": {
  615. "icon-image": [
  616. "match",
  617. [
  618. "get",
  619. "type"
  620. ],
  621. "warning_monitor",
  622. "warning_monitor",
  623. "success_monitor",
  624. "success_monitor",
  625. "error_monitor",
  626. "error_monitor",
  627. "paiKou",
  628. "paiKou",
  629. "YSBZ",
  630. "paiLaoBeng",
  631. "drainOutlet",
  632. "YLK",
  633. "WSBZ",
  634. "wsBeng",
  635. "WSCLC",
  636. "WSC",
  637. "orinign",
  638. "orinign",
  639. "rainStation",
  640. "rain",
  641. "pipeSupervise",
  642. "rainSupervises",
  643. "PKsupervise",
  644. "YQGXMX s",
  645. "waterlog",
  646. "yiLao",
  647. "riverLake",
  648. "KDJZWMX s",
  649. "waterSectionInfo",
  650. "yuanTous",
  651. "ysbz"
  652. ],
  653. "icon-allow-overlap": true,
  654. "icon-anchor": "center",
  655. "icon-size": 0.8,
  656. "text-allow-overlap": true,
  657. "text-field": "{name}",
  658. "text-font": [
  659. "KlokanTech Noto Sans Regular"
  660. ],
  661. "text-size": 16,
  662. "text-line-height": 3,
  663. "text-anchor": "bottom",
  664. "text-max-width": 50,
  665. "text-offset": [
  666. 0,
  667. -1
  668. ]
  669. },
  670. "mType": "mvt"
  671. }
  672. ],
  673. "orders": [
  674. ["point"],
  675. ["all_boundary"],
  676. ["pipeline_info"],
  677. ["pipeline_point"],
  678. ["hn_xy_hm_gw_pk"],
  679. ["hn_xy_hm_psfq"],
  680. ["行政分区"],
  681. ["poi_label"],
  682. ["place_label_city"],
  683. ["road_major_label"],
  684. ["place_label_other"]
  685. ],
  686. "filter": {
  687. "污水管": {
  688. "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
  689. "filter": [["WSLINE", "HSLINE"], ["WSLINE", "HSLINE"],["WSLINE", "HSLINE"]]
  690. },
  691. "雨水管": {
  692. "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
  693. "filter": [["YSLINE"], ["YSLINE"],["YSLINE"]]
  694. },
  695. "合流管": {
  696. "layerName": ["pipeline_info", "pipeline_point","hn_xy_hm_gw_bz"],
  697. "filter": [[ "HSLINE"], ["HSLINE"],[ "HSLINE"]]
  698. },
  699. "排口": {
  700. "layerName": ["hn_xy_hm_gw_pk"],
  701. "filter": [[ "YSLINE","WSLINE","HSLINE"]]
  702. },
  703. "雨水分区": {
  704. "layerName": ["hn_xy_hm_psfq"],
  705. "filter": [[ "ys"]]
  706. },
  707. "污水分区": {
  708. "layerName": ["hn_xy_hm_psfq"],
  709. "filter": [[ "ws"]]
  710. }
  711. }
  712. }