Newer
Older
KaiFengPC / src / views / sponeScreen / gisMF / mapStyle.js
@wudi wudi on 25 Jun 27 KB 1
  1. let isBuild = import.meta.env.VITE_APP_ENV == 'production';
  2. let blue_vector = {
  3. version: 8,
  4. name: 'Basic',
  5. metadata: {
  6. 'mapbox:autocomposite': false,
  7. 'mapbox:type': 'template',
  8. 'maputnik:renderer': 'mbgljs',
  9. 'openmaptiles:version': '3.x',
  10. 'openmaptiles:mapbox:owner': 'openmaptiles',
  11. 'openmaptiles:mapbox:source:url': 'mapbox://openmaptiles.4qljc88t',
  12. },
  13. sources: {
  14. openmaptiles: {
  15. type: 'vector',
  16. tilejson: '2.1.0',
  17. name: 'tilemaker_default',
  18. description: 'Tiles made with Tilemaker',
  19. version: '1.0.0',
  20. scheme: 'xyz',
  21. tiles: isBuild?['https://server1.wh-nf.cn:8155/bm/tile/{z}/{x}/{y}.pbf']:[
  22. 'https://supermap0.wh-nf.cn:8090/bm/tile/{z}/{x}/{y}.pbf',
  23. 'https://supermap1.wh-nf.cn:8090/bm/tile/{z}/{x}/{y}.pbf',
  24. 'https://supermap2.wh-nf.cn:8090/bm/tile/{z}/{x}/{y}.pbf',
  25. 'https://supermap3.wh-nf.cn:8090/bm/tile/{z}/{x}/{y}.pbf'
  26. ],
  27. minzoom: 0,
  28. maxzoom: 14,
  29. },
  30. },
  31. sprite: (isBuild ? "https://server1.wh-nf.cn:8155" : 'https://supermap3.wh-nf.cn:8090') + "/bm/static/map/style/sprite",
  32. glyphs: (isBuild ? "https://server1.wh-nf.cn:8155" : 'https://supermap2.wh-nf.cn:8090') + "/bm/static/map/style/fonts/{fontstack}/{range}.pbf",
  33. layers: [
  34. {
  35. id: 'background',
  36. type: 'background',
  37. paint: {
  38. 'background-color': 'rgba(8,27,54,1)',
  39. },
  40. },
  41. {
  42. id: 'landuse-residential',
  43. type: 'fill',
  44. source: 'openmaptiles',
  45. 'source-layer': 'landuse',
  46. filter: ['all', ['==', '$type', 'Polygon'], ['in', 'class', 'residential', 'suburb', 'neighbourhood']],
  47. layout: {
  48. visibility: 'visible',
  49. },
  50. paint: {
  51. 'fill-opacity': 0.7,
  52. 'fill-color': 'rgba(8,27,54,1)',
  53. },
  54. },
  55. {
  56. id: 'landcover_grass',
  57. type: 'fill',
  58. source: 'openmaptiles',
  59. 'source-layer': 'landcover',
  60. filter: ['==', 'class', 'grass'],
  61. paint: {
  62. 'fill-color': 'rgba(14,39,72,1)',
  63. 'fill-opacity': 1,
  64. },
  65. },
  66. {
  67. id: 'landcover_wood',
  68. type: 'fill',
  69. source: 'openmaptiles',
  70. 'source-layer': 'landcover',
  71. filter: ['==', 'class', 'wood'],
  72. paint: {
  73. 'fill-color': 'rgba(1,1,137,0)',
  74. 'fill-opacity': 1,
  75. },
  76. },
  77. {
  78. id: 'water',
  79. type: 'fill',
  80. source: 'openmaptiles',
  81. 'source-layer': 'water',
  82. filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'intermittent', 1], ['!=', 'brunnel', 'tunnel']],
  83. layout: {
  84. visibility: 'visible',
  85. },
  86. paint: {
  87. 'fill-color': 'rgba(12,59,122,1)',
  88. },
  89. },
  90. {
  91. id: 'water_intermittent',
  92. type: 'fill',
  93. source: 'openmaptiles',
  94. 'source-layer': 'water',
  95. filter: ['all', ['==', '$type', 'Polygon'], ['==', 'intermittent', 1]],
  96. layout: {
  97. visibility: 'visible',
  98. },
  99. paint: {
  100. 'fill-color': 'hsl(205, 56%, 73%)',
  101. 'fill-opacity': 0.7,
  102. },
  103. },
  104. {
  105. id: 'landcover-ice-shelf',
  106. type: 'fill',
  107. source: 'openmaptiles',
  108. 'source-layer': 'landcover',
  109. filter: ['==', 'subclass', 'ice_shelf'],
  110. layout: {
  111. visibility: 'visible',
  112. },
  113. paint: {
  114. 'fill-color': 'hsl(47, 26%, 88%)',
  115. 'fill-opacity': 0.8,
  116. },
  117. },
  118. {
  119. id: 'landcover-glacier',
  120. type: 'fill',
  121. source: 'openmaptiles',
  122. 'source-layer': 'landcover',
  123. filter: ['==', 'subclass', 'glacier'],
  124. layout: {
  125. visibility: 'visible',
  126. },
  127. paint: {
  128. 'fill-color': 'rgba(15,15,59,.7)',
  129. 'fill-opacity': {
  130. base: 1,
  131. stops: [
  132. [0, 1],
  133. [8, 0.5],
  134. ],
  135. },
  136. },
  137. },
  138. {
  139. id: 'landcover_sand',
  140. type: 'fill',
  141. metadata: {},
  142. source: 'openmaptiles',
  143. 'source-layer': 'landcover',
  144. filter: ['all', ['in', 'class', 'sand']],
  145. paint: {
  146. 'fill-antialias': false,
  147. 'fill-color': 'rgba(232, 214, 38, 1)',
  148. 'fill-opacity': 0.3,
  149. },
  150. },
  151. {
  152. id: 'landuse',
  153. type: 'fill',
  154. source: 'openmaptiles',
  155. 'source-layer': 'landuse',
  156. filter: ['==', 'class', 'agriculture'],
  157. layout: {
  158. visibility: 'visible',
  159. },
  160. paint: {
  161. 'fill-color': '#eae0d0',
  162. },
  163. },
  164. {
  165. id: 'landuse_overlay_national_park',
  166. type: 'fill',
  167. source: 'openmaptiles',
  168. 'source-layer': 'landcover',
  169. filter: ['==', 'class', 'national_park'],
  170. paint: {
  171. 'fill-color': '#E1EBB0',
  172. 'fill-opacity': {
  173. base: 1,
  174. stops: [
  175. [5, 0],
  176. [9, 0.75],
  177. ],
  178. },
  179. },
  180. },
  181. {
  182. id: 'waterway-tunnel',
  183. type: 'line',
  184. source: 'openmaptiles',
  185. 'source-layer': 'waterway',
  186. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'tunnel']],
  187. layout: {
  188. visibility: 'visible',
  189. },
  190. paint: {
  191. 'line-color': 'hsl(205, 56%, 73%)',
  192. 'line-dasharray': [3, 3],
  193. 'line-gap-width': {
  194. stops: [
  195. [12, 0],
  196. [20, 6],
  197. ],
  198. },
  199. 'line-opacity': 1,
  200. 'line-width': {
  201. base: 1.4,
  202. stops: [
  203. [8, 1],
  204. [20, 2],
  205. ],
  206. },
  207. },
  208. },
  209. {
  210. id: 'waterway',
  211. type: 'line',
  212. source: 'openmaptiles',
  213. 'source-layer': 'waterway',
  214. filter: ['all', ['==', '$type', 'LineString'], ['!in', 'brunnel', 'tunnel', 'bridge'], ['!=', 'intermittent', 1]],
  215. layout: {
  216. visibility: 'visible',
  217. },
  218. paint: {
  219. 'line-opacity': 1,
  220. 'line-width': {
  221. base: 1.4,
  222. stops: [
  223. [8, 1],
  224. [20, 8],
  225. ],
  226. },
  227. 'line-color': 'rgba(9,38,86,1)',
  228. },
  229. },
  230. {
  231. id: 'waterway_intermittent',
  232. type: 'line',
  233. source: 'openmaptiles',
  234. 'source-layer': 'waterway',
  235. filter: ['all', ['==', '$type', 'LineString'], ['!in', 'brunnel', 'tunnel', 'bridge'], ['==', 'intermittent', 1]],
  236. layout: {
  237. visibility: 'visible',
  238. },
  239. paint: {
  240. 'line-color': 'hsl(205, 56%, 73%)',
  241. 'line-dasharray': [2, 1],
  242. 'line-opacity': 1,
  243. 'line-width': {
  244. base: 1.4,
  245. stops: [
  246. [8, 1],
  247. [20, 8],
  248. ],
  249. },
  250. },
  251. },
  252. {
  253. id: 'tunnel_railway_transit',
  254. type: 'line',
  255. source: 'openmaptiles',
  256. 'source-layer': 'transportation',
  257. minzoom: 0,
  258. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'tunnel'], ['==', 'class', 'transit']],
  259. layout: {
  260. 'line-cap': 'butt',
  261. 'line-join': 'miter',
  262. },
  263. paint: {
  264. 'line-color': 'hsl(34, 12%, 66%)',
  265. 'line-dasharray': [3, 3],
  266. 'line-opacity': {
  267. base: 1,
  268. stops: [
  269. [11, 0],
  270. [16, 1],
  271. ],
  272. },
  273. },
  274. },
  275. {
  276. id: 'housenumber',
  277. type: 'symbol',
  278. source: 'openmaptiles',
  279. 'source-layer': 'housenumber',
  280. minzoom: 17,
  281. filter: ['==', '$type', 'Point'],
  282. layout: {
  283. 'text-field': '{housenumber}',
  284. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  285. 'text-size': 16,
  286. },
  287. paint: {
  288. 'text-halo-color': 'rgba(0,0,0,1)',
  289. 'text-color': 'rgba(0,167,210,1)',
  290. 'icon-opacity': 1,
  291. 'text-halo-width': 1,
  292. },
  293. },
  294. {
  295. id: 'road_area_pier',
  296. type: 'fill',
  297. metadata: {},
  298. source: 'openmaptiles',
  299. 'source-layer': 'transportation',
  300. filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'pier']],
  301. layout: {
  302. visibility: 'visible',
  303. },
  304. paint: {
  305. 'fill-antialias': true,
  306. 'fill-color': 'hsl(47, 26%, 88%)',
  307. },
  308. },
  309. {
  310. id: 'road_pier',
  311. type: 'line',
  312. metadata: {},
  313. source: 'openmaptiles',
  314. 'source-layer': 'transportation',
  315. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'pier']],
  316. layout: {
  317. 'line-cap': 'round',
  318. 'line-join': 'round',
  319. },
  320. paint: {
  321. 'line-color': 'hsl(47, 26%, 88%)',
  322. 'line-width': {
  323. base: 1.2,
  324. stops: [
  325. [15, 1],
  326. [17, 4],
  327. ],
  328. },
  329. },
  330. },
  331. {
  332. id: 'road_bridge_area',
  333. type: 'fill',
  334. source: 'openmaptiles',
  335. 'source-layer': 'transportation',
  336. filter: ['all', ['==', '$type', 'Polygon'], ['in', 'brunnel', 'bridge']],
  337. layout: {},
  338. paint: {
  339. 'fill-color': 'rgba(10,26,41,1)',
  340. 'fill-opacity': 0.5,
  341. },
  342. },
  343. {
  344. id: 'road_path',
  345. type: 'line',
  346. source: 'openmaptiles',
  347. 'source-layer': 'transportation',
  348. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'path', 'track']],
  349. layout: {
  350. 'line-cap': 'square',
  351. 'line-join': 'bevel',
  352. },
  353. paint: {
  354. 'line-color': 'hsl(0, 0%, 50%)',
  355. 'line-dasharray': [1],
  356. 'line-width': {
  357. base: 1.55,
  358. stops: [
  359. [4, 0.25],
  360. [20, 10],
  361. ],
  362. },
  363. },
  364. },
  365. {
  366. id: 'road_minor',
  367. type: 'line',
  368. source: 'openmaptiles',
  369. 'source-layer': 'transportation',
  370. minzoom: 13,
  371. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'minor', 'service']],
  372. layout: {
  373. 'line-cap': 'round',
  374. 'line-join': 'round',
  375. },
  376. paint: {
  377. 'line-width': {
  378. base: 1.55,
  379. stops: [
  380. [4, 0.25],
  381. [20, 30],
  382. ],
  383. },
  384. 'line-color': 'rgba(10,26,41,1)',
  385. },
  386. },
  387. {
  388. id: 'road_minor case',
  389. type: 'line',
  390. source: 'openmaptiles',
  391. 'source-layer': 'transportation',
  392. minzoom: 13,
  393. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'minor', 'service']],
  394. layout: {},
  395. paint: {
  396. 'line-width': {
  397. stops: [
  398. [12, 0.75],
  399. [20, 2],
  400. ],
  401. base: 1.2,
  402. },
  403. 'line-gap-width': {
  404. stops: [
  405. [13, 0],
  406. [14, 2],
  407. [18, 10],
  408. ],
  409. base: 1.5,
  410. },
  411. 'line-opacity': {
  412. stops: [
  413. [13.99, 0],
  414. [14, 1],
  415. ],
  416. base: 1,
  417. },
  418. 'line-color': 'rgba(25,81,133,1)',
  419. },
  420. },
  421. {
  422. id: 'tunnel_minor',
  423. type: 'line',
  424. source: 'openmaptiles',
  425. 'source-layer': 'transportation',
  426. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor_road']],
  427. layout: {
  428. 'line-cap': 'butt',
  429. 'line-join': 'miter',
  430. },
  431. paint: {
  432. 'line-color': '#efefef',
  433. 'line-dasharray': [0.36, 0.18],
  434. 'line-width': {
  435. base: 1.55,
  436. stops: [
  437. [4, 0.25],
  438. [20, 30],
  439. ],
  440. },
  441. },
  442. },
  443. {
  444. id: 'tunnel_major',
  445. type: 'line',
  446. source: 'openmaptiles',
  447. 'source-layer': 'transportation',
  448. filter: [
  449. 'all',
  450. ['==', '$type', 'LineString'],
  451. ['==', 'brunnel', 'tunnel'],
  452. ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'],
  453. ],
  454. layout: {
  455. 'line-cap': 'butt',
  456. 'line-join': 'miter',
  457. },
  458. paint: {
  459. 'line-color': '#fff',
  460. 'line-dasharray': [0.28, 0.14],
  461. 'line-width': {
  462. base: 1.4,
  463. stops: [
  464. [6, 0.5],
  465. [20, 30],
  466. ],
  467. },
  468. },
  469. },
  470. {
  471. id: 'aeroway-area',
  472. type: 'fill',
  473. metadata: {
  474. 'mapbox:group': '1444849345966.4436',
  475. },
  476. source: 'openmaptiles',
  477. 'source-layer': 'aeroway',
  478. minzoom: 4,
  479. filter: ['all', ['==', '$type', 'Polygon'], ['in', 'class', 'runway', 'taxiway']],
  480. layout: {
  481. visibility: 'visible',
  482. },
  483. paint: {
  484. 'fill-color': 'rgba(255, 255, 255, 1)',
  485. 'fill-opacity': {
  486. base: 1,
  487. stops: [
  488. [13, 0],
  489. [14, 1],
  490. ],
  491. },
  492. },
  493. },
  494. {
  495. id: 'aeroway-taxiway',
  496. type: 'line',
  497. metadata: {
  498. 'mapbox:group': '1444849345966.4436',
  499. },
  500. source: 'openmaptiles',
  501. 'source-layer': 'aeroway',
  502. minzoom: 12,
  503. filter: ['all', ['in', 'class', 'taxiway'], ['==', '$type', 'LineString']],
  504. layout: {
  505. 'line-cap': 'round',
  506. 'line-join': 'round',
  507. visibility: 'none',
  508. },
  509. paint: {
  510. 'line-color': 'rgba(255, 255, 255, 1)',
  511. 'line-opacity': 1,
  512. 'line-width': {
  513. base: 1.5,
  514. stops: [
  515. [12, 1],
  516. [17, 10],
  517. ],
  518. },
  519. },
  520. },
  521. {
  522. id: 'aeroway-runway',
  523. type: 'line',
  524. metadata: {
  525. 'mapbox:group': '1444849345966.4436',
  526. },
  527. source: 'openmaptiles',
  528. 'source-layer': 'aeroway',
  529. minzoom: 4,
  530. filter: ['all', ['in', 'class', 'runway'], ['==', '$type', 'LineString']],
  531. layout: {
  532. 'line-cap': 'round',
  533. 'line-join': 'round',
  534. visibility: 'visible',
  535. },
  536. paint: {
  537. 'line-color': 'rgba(15,15,59, 1)',
  538. 'line-opacity': 1,
  539. 'line-width': {
  540. base: 1.5,
  541. stops: [
  542. [11, 4],
  543. [17, 50],
  544. ],
  545. },
  546. },
  547. },
  548. {
  549. id: 'road_trunk_primary',
  550. type: 'line',
  551. source: 'openmaptiles',
  552. 'source-layer': 'transportation',
  553. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'trunk', 'primary']],
  554. layout: {
  555. 'line-cap': 'round',
  556. 'line-join': 'round',
  557. },
  558. paint: {
  559. 'line-color': 'rgba(10,26,41,1)',
  560. 'line-width': {
  561. base: 1.4,
  562. stops: [
  563. [6, 0.5],
  564. [20, 30],
  565. ],
  566. },
  567. },
  568. },
  569. {
  570. id: 'road_trunk_primary case',
  571. type: 'line',
  572. source: 'openmaptiles',
  573. 'source-layer': 'transportation',
  574. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'trunk', 'primary']],
  575. layout: {},
  576. paint: {
  577. 'line-width': {
  578. stops: [
  579. [12, 0.75],
  580. [20, 2],
  581. ],
  582. base: 1.2,
  583. },
  584. 'line-gap-width': {
  585. stops: [
  586. [13, 0],
  587. [14, 2],
  588. [18, 10],
  589. ],
  590. base: 1.5,
  591. },
  592. 'line-opacity': {
  593. stops: [
  594. [10, 0],
  595. [14, 1],
  596. ],
  597. base: 1,
  598. },
  599. 'line-color': 'rgba(25,81,133,1)',
  600. },
  601. },
  602. {
  603. id: 'road_secondary_tertiary',
  604. type: 'line',
  605. source: 'openmaptiles',
  606. 'source-layer': 'transportation',
  607. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'secondary', 'tertiary']],
  608. layout: {
  609. 'line-cap': 'round',
  610. 'line-join': 'round',
  611. },
  612. paint: {
  613. 'line-color': 'rgba(10,26,41,1)',
  614. 'line-width': {
  615. base: 1.4,
  616. stops: [
  617. [6, 0.5],
  618. [20, 20],
  619. ],
  620. },
  621. },
  622. },
  623. {
  624. id: 'road_secondary_tertiary case',
  625. type: 'line',
  626. source: 'openmaptiles',
  627. 'source-layer': 'transportation',
  628. filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'secondary', 'tertiary']],
  629. layout: {},
  630. paint: {
  631. 'line-width': {
  632. stops: [
  633. [12, 0.75],
  634. [20, 2],
  635. ],
  636. base: 1.2,
  637. },
  638. 'line-gap-width': {
  639. stops: [
  640. [13, 0],
  641. [14, 2],
  642. [18, 10],
  643. ],
  644. base: 1.5,
  645. },
  646. 'line-opacity': {
  647. stops: [
  648. [10, 0],
  649. [14, 1],
  650. ],
  651. base: 1,
  652. },
  653. 'line-color': 'rgba(25,81,133,1)',
  654. },
  655. },
  656. {
  657. id: 'road_major_motorway',
  658. type: 'line',
  659. source: 'openmaptiles',
  660. 'source-layer': 'transportation',
  661. filter: ['all', ['==', '$type', 'LineString'], ['==', 'class', 'motorway']],
  662. layout: {
  663. 'line-cap': 'round',
  664. 'line-join': 'round',
  665. },
  666. paint: {
  667. 'line-color': 'rgba(10,26,41,1)',
  668. 'line-offset': 0,
  669. 'line-width': {
  670. base: 1.4,
  671. stops: [
  672. [8, 1],
  673. [16, 10],
  674. ],
  675. },
  676. },
  677. },
  678. {
  679. id: 'railway-transit',
  680. type: 'line',
  681. source: 'openmaptiles',
  682. 'source-layer': 'transportation',
  683. filter: ['all', ['==', 'class', 'transit'], ['!=', 'brunnel', 'tunnel']],
  684. layout: {
  685. visibility: 'visible',
  686. },
  687. paint: {
  688. 'line-color': 'hsl(34, 12%, 66%)',
  689. 'line-opacity': {
  690. base: 1,
  691. stops: [
  692. [11, 0],
  693. [16, 1],
  694. ],
  695. },
  696. },
  697. },
  698. {
  699. id: 'railway',
  700. type: 'line',
  701. source: 'openmaptiles',
  702. 'source-layer': 'transportation',
  703. filter: ['==', 'class', 'rail'],
  704. layout: {
  705. visibility: 'visible',
  706. },
  707. paint: {
  708. 'line-color': 'rgba(183, 174, 161, 1)',
  709. 'line-opacity': {
  710. base: 1,
  711. stops: [
  712. [11, 0],
  713. [16, 1],
  714. ],
  715. },
  716. },
  717. },
  718. {
  719. id: 'waterway-bridge-case',
  720. type: 'line',
  721. source: 'openmaptiles',
  722. 'source-layer': 'waterway',
  723. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'bridge']],
  724. layout: {
  725. 'line-cap': 'butt',
  726. 'line-join': 'miter',
  727. },
  728. paint: {
  729. 'line-color': '#bbbbbb',
  730. 'line-gap-width': {
  731. base: 1.55,
  732. stops: [
  733. [4, 0.25],
  734. [20, 30],
  735. ],
  736. },
  737. 'line-width': {
  738. base: 1.6,
  739. stops: [
  740. [12, 0.5],
  741. [20, 10],
  742. ],
  743. },
  744. },
  745. },
  746. {
  747. id: 'waterway-bridge',
  748. type: 'line',
  749. source: 'openmaptiles',
  750. 'source-layer': 'waterway',
  751. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'bridge']],
  752. layout: {
  753. 'line-cap': 'round',
  754. 'line-join': 'round',
  755. },
  756. paint: {
  757. 'line-color': 'hsl(205, 56%, 73%)',
  758. 'line-width': {
  759. base: 1.55,
  760. stops: [
  761. [4, 0.25],
  762. [20, 30],
  763. ],
  764. },
  765. },
  766. },
  767. {
  768. id: 'bridge_minor case',
  769. type: 'line',
  770. source: 'openmaptiles',
  771. 'source-layer': 'transportation',
  772. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'bridge'], ['==', 'class', 'minor_road']],
  773. layout: {},
  774. paint: {
  775. 'line-width': {
  776. stops: [
  777. [12, 0.75],
  778. [20, 2],
  779. ],
  780. base: 1.2,
  781. },
  782. 'line-gap-width': {
  783. stops: [
  784. [13, 0],
  785. [14, 2],
  786. [18, 10],
  787. ],
  788. base: 1.5,
  789. },
  790. 'line-opacity': {
  791. stops: [
  792. [13.99, 0],
  793. [14, 1],
  794. ],
  795. base: 1,
  796. },
  797. 'line-color': 'rgba(25,81,133,1)',
  798. },
  799. },
  800. {
  801. id: 'bridge_major case',
  802. type: 'line',
  803. source: 'openmaptiles',
  804. 'source-layer': 'transportation',
  805. filter: [
  806. 'all',
  807. ['==', '$type', 'LineString'],
  808. ['==', 'brunnel', 'bridge'],
  809. ['in', 'class', 'road', 'primary', 'secondary', 'tertiary', 'trunk'],
  810. ],
  811. layout: {},
  812. paint: {
  813. 'line-width': {
  814. stops: [
  815. [12, 0.75],
  816. [20, 2],
  817. ],
  818. base: 1.2,
  819. },
  820. 'line-gap-width': {
  821. stops: [
  822. [13, 0],
  823. [14, 2],
  824. [18, 10],
  825. ],
  826. base: 1.5,
  827. },
  828. 'line-opacity': {
  829. stops: [
  830. [13.99, 0],
  831. [14, 1],
  832. ],
  833. base: 1,
  834. },
  835. 'line-color': 'rgba(25,81,133,1)',
  836. },
  837. },
  838. {
  839. id: 'bridge_minor',
  840. type: 'line',
  841. source: 'openmaptiles',
  842. 'source-layer': 'transportation',
  843. filter: ['all', ['==', '$type', 'LineString'], ['==', 'brunnel', 'bridge'], ['==', 'class', 'minor_road']],
  844. layout: {
  845. 'line-cap': 'round',
  846. 'line-join': 'round',
  847. },
  848. paint: {
  849. 'line-color': '#efefef',
  850. 'line-width': {
  851. base: 1.55,
  852. stops: [
  853. [4, 0.25],
  854. [20, 30],
  855. ],
  856. },
  857. },
  858. },
  859. {
  860. id: 'bridge_major',
  861. type: 'line',
  862. source: 'openmaptiles',
  863. 'source-layer': 'transportation',
  864. filter: [
  865. 'all',
  866. ['==', '$type', 'LineString'],
  867. ['==', 'brunnel', 'bridge'],
  868. ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'],
  869. ],
  870. layout: {
  871. 'line-cap': 'round',
  872. 'line-join': 'round',
  873. },
  874. paint: {
  875. 'line-color': 'rgba(10,26,41,1)',
  876. 'line-width': {
  877. base: 1.4,
  878. stops: [
  879. [6, 0.5],
  880. [20, 30],
  881. ],
  882. },
  883. },
  884. },
  885. {
  886. id: 'admin_sub',
  887. type: 'line',
  888. source: 'openmaptiles',
  889. 'source-layer': 'boundary',
  890. filter: ['all'],
  891. layout: {
  892. visibility: 'visible',
  893. 'line-join': 'round',
  894. },
  895. paint: {
  896. 'line-opacity': 0,
  897. 'line-dasharray': [1, 0],
  898. 'line-width': 1,
  899. 'line-color': 'rgba(10,26,41,1)',
  900. },
  901. },
  902. {
  903. id: 'admin_country_z0-4',
  904. type: 'line',
  905. source: 'openmaptiles',
  906. 'source-layer': 'boundary',
  907. minzoom: 0,
  908. maxzoom: 5,
  909. filter: ['all', ['<=', 'admin_level', 2], ['==', '$type', 'LineString'], ['!has', 'claimed_by']],
  910. layout: {
  911. 'line-cap': 'round',
  912. 'line-join': 'round',
  913. visibility: 'visible',
  914. },
  915. paint: {
  916. 'line-color': 'rgba(255, 255, 255, 0)',
  917. 'line-width': {
  918. base: 1.3,
  919. stops: [
  920. [3, 0.5],
  921. [22, 15],
  922. ],
  923. },
  924. },
  925. },
  926. {
  927. id: 'admin_country_z5-',
  928. type: 'line',
  929. source: 'openmaptiles',
  930. 'source-layer': 'boundary',
  931. minzoom: 5,
  932. filter: ['all', ['<=', 'admin_level', 2], ['==', '$type', 'LineString']],
  933. layout: {
  934. 'line-cap': 'round',
  935. 'line-join': 'round',
  936. visibility: 'visible',
  937. },
  938. paint: {
  939. 'line-color': 'hsl(0, 0%, 60%)',
  940. 'line-width': {
  941. base: 1.3,
  942. stops: [
  943. [3, 0.5],
  944. [22, 15],
  945. ],
  946. },
  947. },
  948. },
  949. {
  950. id: 'poi_label',
  951. type: 'symbol',
  952. source: 'openmaptiles',
  953. 'source-layer': 'poi',
  954. minzoom: 11,
  955. filter: ['all', ['==', '$type', 'Point'], ['==', 'rank', 1]],
  956. layout: {
  957. 'icon-size': 1,
  958. 'text-anchor': 'top',
  959. 'text-field': '{name:nonlatin}',
  960. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  961. 'text-max-width': 8,
  962. 'text-offset': [0, 0.5],
  963. 'text-size': 14,
  964. visibility: 'visible',
  965. },
  966. paint: {
  967. 'text-halo-color': 'rgba(0,0,0,1)',
  968. 'text-color': 'rgba(0,167,210,1)',
  969. 'icon-opacity': 1,
  970. 'text-halo-width': 1,
  971. },
  972. },
  973. {
  974. id: 'airport-label',
  975. type: 'symbol',
  976. source: 'openmaptiles',
  977. 'source-layer': 'aerodrome_label',
  978. minzoom: 10,
  979. filter: ['all', ['has', 'iata']],
  980. layout: {
  981. 'icon-size': 1,
  982. 'text-anchor': 'top',
  983. 'text-field': '{name:nonlatin}',
  984. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  985. 'text-max-width': 8,
  986. 'text-offset': [0, 0.5],
  987. 'text-size': 14,
  988. visibility: 'visible',
  989. },
  990. paint: {
  991. 'text-halo-color': 'rgba(0,0,0,1)',
  992. 'text-color': 'rgba(0,167,210,1)',
  993. 'icon-opacity': 1,
  994. 'text-halo-width': 1,
  995. },
  996. },
  997. {
  998. id: 'road_major_label',
  999. type: 'symbol',
  1000. source: 'openmaptiles',
  1001. 'source-layer': 'transportation_name',
  1002. minzoom: 11,
  1003. filter: ['==', '$type', 'LineString'],
  1004. layout: {
  1005. 'symbol-placement': 'line',
  1006. 'text-field': '{name:nonlatin} {name:nonlatin}',
  1007. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  1008. 'text-letter-spacing': 0.1,
  1009. 'text-rotation-alignment': 'map',
  1010. 'text-size': {
  1011. base: 1.4,
  1012. stops: [
  1013. [10, 16],
  1014. [20, 22],
  1015. ],
  1016. },
  1017. 'text-transform': 'uppercase',
  1018. visibility: 'visible',
  1019. },
  1020. paint: {
  1021. 'text-halo-color': 'rgba(0,0,0,1)',
  1022. 'text-color': 'rgba(0,167,210,1)',
  1023. 'icon-opacity': 1,
  1024. 'text-halo-width': 1,
  1025. },
  1026. },
  1027. {
  1028. id: 'place_label_other',
  1029. type: 'symbol',
  1030. source: 'openmaptiles',
  1031. 'source-layer': 'place',
  1032. minzoom: 8,
  1033. filter: ['all', ['==', '$type', 'Point'], ['!in', 'class', 'city', 'state', 'country', 'continent']],
  1034. layout: {
  1035. 'text-anchor': 'center',
  1036. 'text-field': '{name:nonlatin}',
  1037. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  1038. 'text-max-width': 6,
  1039. 'text-size': 14,
  1040. visibility: 'none',
  1041. },
  1042. paint: {
  1043. 'text-halo-color': 'rgba(0,0,0,1)',
  1044. 'text-color': 'rgba(0,167,210,1)',
  1045. 'icon-opacity': 1,
  1046. 'text-halo-width': 1,
  1047. },
  1048. },
  1049. {
  1050. id: 'place_label_city',
  1051. type: 'symbol',
  1052. source: 'openmaptiles',
  1053. 'source-layer': 'place',
  1054. maxzoom: 16,
  1055. filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'city']],
  1056. layout: {
  1057. 'text-field': '{name:nonlatin}',
  1058. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  1059. 'text-max-width': 10,
  1060. 'text-size': {
  1061. stops: [
  1062. [8, 20],
  1063. [10, 24],
  1064. ],
  1065. },
  1066. },
  1067. paint: {
  1068. 'text-halo-color': 'rgba(0,0,0,1)',
  1069. 'text-color': 'rgba(0,167,210,1)',
  1070. 'icon-opacity': 1,
  1071. 'text-halo-width': 1,
  1072. },
  1073. },
  1074. {
  1075. id: 'country_label-other',
  1076. type: 'symbol',
  1077. source: 'openmaptiles',
  1078. 'source-layer': 'place',
  1079. maxzoom: 12,
  1080. filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country'], ['!has', 'iso_a2']],
  1081. layout: {
  1082. 'text-field': '{name:nonlatin}',
  1083. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  1084. 'text-max-width': 10,
  1085. 'text-size': {
  1086. stops: [
  1087. [3, 20],
  1088. [8, 30],
  1089. ],
  1090. },
  1091. visibility: 'visible',
  1092. },
  1093. paint: {
  1094. 'text-halo-color': 'rgba(0,0,0,1)',
  1095. 'text-color': 'rgba(0,167,210,1)',
  1096. 'icon-opacity': 1,
  1097. 'text-halo-width': 1,
  1098. },
  1099. },
  1100. {
  1101. id: 'country_label',
  1102. type: 'symbol',
  1103. source: 'openmaptiles',
  1104. 'source-layer': 'place',
  1105. maxzoom: 12,
  1106. filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'country'], ['has', 'iso_a2']],
  1107. layout: {
  1108. 'text-field': '{name:nonlatin}',
  1109. 'text-font': ['KlokanTech Noto Sans CJK Bold'],
  1110. 'text-max-width': 10,
  1111. 'text-size': 28,
  1112. visibility: 'visible',
  1113. },
  1114. paint: {
  1115. 'text-halo-color': 'rgba(0,0,0,1)',
  1116. 'text-color': 'rgba(0,167,210,1)',
  1117. 'icon-opacity': 1,
  1118. 'text-halo-width': 1,
  1119. },
  1120. },
  1121. {
  1122. id: 'building-3d',
  1123. type: 'fill-extrusion',
  1124. metadata: {},
  1125. source: 'openmaptiles',
  1126. 'source-layer': 'building',
  1127. minzoom: 14,
  1128. filter: ['all', ['!has', 'hide_3d']],
  1129. layout: {
  1130. visibility: 'none',
  1131. },
  1132. paint: {
  1133. 'fill-extrusion-base': {
  1134. type: 'identity',
  1135. property: 'render_min_height',
  1136. },
  1137. 'fill-extrusion-color': 'rgba(15,15,59, 1)',
  1138. 'fill-extrusion-height': {
  1139. type: 'identity',
  1140. property: 'render_height',
  1141. },
  1142. 'fill-extrusion-opacity': 0.3,
  1143. },
  1144. },
  1145. ],
  1146. id: 'basic',
  1147. };
  1148. export default blue_vector;