behavior-spacetime-style.json 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. {
  2. "version": 8,
  3. "name": "behavior-spacetime-offline-template",
  4. "sources": {
  5. "behavior-basemap": {
  6. "type": "vector",
  7. "url": "pmtiles://resource/map/china.pmtiles"
  8. }
  9. },
  10. "layers": [
  11. {
  12. "id": "behavior-background",
  13. "type": "background",
  14. "paint": {
  15. "background-color": "#f7fafc"
  16. }
  17. },
  18. {
  19. "id": "behavior-landcover",
  20. "type": "fill",
  21. "source": "behavior-basemap",
  22. "source-layer": "landcover",
  23. "paint": {
  24. "fill-color": "#e7efe4",
  25. "fill-opacity": 0.8
  26. }
  27. },
  28. {
  29. "id": "behavior-landuse",
  30. "type": "fill",
  31. "source": "behavior-basemap",
  32. "source-layer": "landuse",
  33. "paint": {
  34. "fill-color": [
  35. "match",
  36. [
  37. "get",
  38. "class"
  39. ],
  40. "industrial",
  41. "#ece6df",
  42. "residential",
  43. "#f3efe7",
  44. "commercial",
  45. "#f7eee1",
  46. "#eef2e7"
  47. ],
  48. "fill-opacity": 0.72
  49. }
  50. },
  51. {
  52. "id": "behavior-park",
  53. "type": "fill",
  54. "source": "behavior-basemap",
  55. "source-layer": "park",
  56. "paint": {
  57. "fill-color": "#dcefd4",
  58. "fill-opacity": 0.76
  59. }
  60. },
  61. {
  62. "id": "behavior-water",
  63. "type": "fill",
  64. "source": "behavior-basemap",
  65. "source-layer": "water",
  66. "paint": {
  67. "fill-color": "#cfe6ff",
  68. "fill-opacity": 0.96
  69. }
  70. },
  71. {
  72. "id": "behavior-waterway",
  73. "type": "line",
  74. "source": "behavior-basemap",
  75. "source-layer": "waterway",
  76. "paint": {
  77. "line-color": "#9dc8f7",
  78. "line-width": [
  79. "interpolate",
  80. [
  81. "linear"
  82. ],
  83. [
  84. "zoom"
  85. ],
  86. 4,
  87. 0.6,
  88. 12,
  89. 2.2
  90. ]
  91. }
  92. },
  93. {
  94. "id": "behavior-boundary",
  95. "type": "line",
  96. "source": "behavior-basemap",
  97. "source-layer": "boundary",
  98. "paint": {
  99. "line-color": "#a7b3c2",
  100. "line-width": [
  101. "interpolate",
  102. [
  103. "linear"
  104. ],
  105. [
  106. "zoom"
  107. ],
  108. 3,
  109. 0.4,
  110. 10,
  111. 1.1
  112. ],
  113. "line-dasharray": [
  114. 3,
  115. 2
  116. ],
  117. "line-opacity": 0.7
  118. }
  119. },
  120. {
  121. "id": "behavior-transportation-casing",
  122. "type": "line",
  123. "source": "behavior-basemap",
  124. "source-layer": "transportation",
  125. "layout": {
  126. "line-cap": "round",
  127. "line-join": "round"
  128. },
  129. "paint": {
  130. "line-color": "#ffffff",
  131. "line-width": [
  132. "interpolate",
  133. [
  134. "linear"
  135. ],
  136. [
  137. "zoom"
  138. ],
  139. 5,
  140. [
  141. "match",
  142. [
  143. "get",
  144. "class"
  145. ],
  146. "motorway",
  147. 1.4,
  148. "trunk",
  149. 1.3,
  150. "primary",
  151. 1.2,
  152. 0.9
  153. ],
  154. 12,
  155. [
  156. "match",
  157. [
  158. "get",
  159. "class"
  160. ],
  161. "motorway",
  162. 7.2,
  163. "trunk",
  164. 6.2,
  165. "primary",
  166. 5.4,
  167. 3.2
  168. ]
  169. ],
  170. "line-opacity": 0.94
  171. }
  172. },
  173. {
  174. "id": "behavior-transportation",
  175. "type": "line",
  176. "source": "behavior-basemap",
  177. "source-layer": "transportation",
  178. "layout": {
  179. "line-cap": "round",
  180. "line-join": "round"
  181. },
  182. "paint": {
  183. "line-color": [
  184. "match",
  185. [
  186. "get",
  187. "class"
  188. ],
  189. "motorway",
  190. "#e3a34a",
  191. "trunk",
  192. "#efb366",
  193. "primary",
  194. "#f3c985",
  195. "secondary",
  196. "#f5d8aa",
  197. "#d6dde5"
  198. ],
  199. "line-width": [
  200. "interpolate",
  201. [
  202. "linear"
  203. ],
  204. [
  205. "zoom"
  206. ],
  207. 5,
  208. [
  209. "match",
  210. [
  211. "get",
  212. "class"
  213. ],
  214. "motorway",
  215. 0.9,
  216. "trunk",
  217. 0.8,
  218. "primary",
  219. 0.7,
  220. 0.5
  221. ],
  222. 12,
  223. [
  224. "match",
  225. [
  226. "get",
  227. "class"
  228. ],
  229. "motorway",
  230. 4.8,
  231. "trunk",
  232. 4.2,
  233. "primary",
  234. 3.4,
  235. 2.2
  236. ]
  237. ],
  238. "line-opacity": 0.98
  239. }
  240. },
  241. {
  242. "id": "behavior-aeroway",
  243. "type": "line",
  244. "source": "behavior-basemap",
  245. "source-layer": "aeroway",
  246. "paint": {
  247. "line-color": "#bcc7d3",
  248. "line-width": [
  249. "interpolate",
  250. [
  251. "linear"
  252. ],
  253. [
  254. "zoom"
  255. ],
  256. 8,
  257. 0.7,
  258. 12,
  259. 2.4
  260. ]
  261. }
  262. },
  263. {
  264. "id": "behavior-building",
  265. "type": "fill",
  266. "source": "behavior-basemap",
  267. "source-layer": "building",
  268. "paint": {
  269. "fill-color": "#dbe3ea",
  270. "fill-opacity": 0.74,
  271. "fill-outline-color": "#c7d1da"
  272. }
  273. },
  274. {
  275. "id": "behavior-water-name",
  276. "type": "symbol",
  277. "source": "behavior-basemap",
  278. "source-layer": "water_name",
  279. "minzoom": 4,
  280. "filter": [
  281. "has",
  282. "name"
  283. ],
  284. "layout": {
  285. "symbol-placement": "line",
  286. "text-field": [
  287. "coalesce",
  288. [
  289. "get",
  290. "name:zh-Hans"
  291. ],
  292. [
  293. "get",
  294. "name:zh"
  295. ],
  296. [
  297. "get",
  298. "name"
  299. ]
  300. ],
  301. "text-font": [
  302. "Microsoft YaHei",
  303. "Microsoft JhengHei",
  304. "Noto Sans CJK SC"
  305. ],
  306. "text-size": [
  307. "interpolate",
  308. [
  309. "linear"
  310. ],
  311. [
  312. "zoom"
  313. ],
  314. 4,
  315. 10,
  316. 12,
  317. 14
  318. ]
  319. },
  320. "paint": {
  321. "text-color": "#5b8dbf",
  322. "text-halo-color": "rgba(255, 255, 255, 0.92)",
  323. "text-halo-width": 1.2
  324. }
  325. },
  326. {
  327. "id": "behavior-transportation-name",
  328. "type": "symbol",
  329. "source": "behavior-basemap",
  330. "source-layer": "transportation_name",
  331. "minzoom": 9,
  332. "filter": [
  333. "has",
  334. "name"
  335. ],
  336. "layout": {
  337. "symbol-placement": "line",
  338. "text-field": [
  339. "coalesce",
  340. [
  341. "get",
  342. "name:zh-Hans"
  343. ],
  344. [
  345. "get",
  346. "name:zh"
  347. ],
  348. [
  349. "get",
  350. "name"
  351. ]
  352. ],
  353. "text-font": [
  354. "Microsoft YaHei",
  355. "Microsoft JhengHei",
  356. "Noto Sans CJK SC"
  357. ],
  358. "text-size": [
  359. "interpolate",
  360. [
  361. "linear"
  362. ],
  363. [
  364. "zoom"
  365. ],
  366. 9,
  367. 10,
  368. 14,
  369. 13
  370. ],
  371. "symbol-spacing": 320
  372. },
  373. "paint": {
  374. "text-color": "#6b7280",
  375. "text-halo-color": "rgba(255, 255, 255, 0.96)",
  376. "text-halo-width": 1.4
  377. }
  378. },
  379. {
  380. "id": "behavior-place-label",
  381. "type": "symbol",
  382. "source": "behavior-basemap",
  383. "source-layer": "place",
  384. "minzoom": 3,
  385. "filter": [
  386. "has",
  387. "name"
  388. ],
  389. "layout": {
  390. "text-field": [
  391. "coalesce",
  392. [
  393. "get",
  394. "name:zh-Hans"
  395. ],
  396. [
  397. "get",
  398. "name:zh"
  399. ],
  400. [
  401. "get",
  402. "name"
  403. ]
  404. ],
  405. "text-font": [
  406. "Microsoft YaHei",
  407. "Microsoft JhengHei",
  408. "Noto Sans CJK SC"
  409. ],
  410. "text-size": [
  411. "match",
  412. [
  413. "get",
  414. "class"
  415. ],
  416. "country",
  417. 15,
  418. "state",
  419. 14,
  420. "province",
  421. 14,
  422. "city",
  423. 13,
  424. "town",
  425. 12,
  426. "village",
  427. 11,
  428. 11
  429. ],
  430. "text-anchor": "top",
  431. "text-offset": [
  432. 0,
  433. 0.6
  434. ]
  435. },
  436. "paint": {
  437. "text-color": "#1f2937",
  438. "text-halo-color": "rgba(255, 255, 255, 0.98)",
  439. "text-halo-width": 1.5
  440. }
  441. },
  442. {
  443. "id": "behavior-poi-label",
  444. "type": "symbol",
  445. "source": "behavior-basemap",
  446. "source-layer": "poi",
  447. "minzoom": 12,
  448. "filter": [
  449. "has",
  450. "name"
  451. ],
  452. "layout": {
  453. "text-field": [
  454. "coalesce",
  455. [
  456. "get",
  457. "name:zh-Hans"
  458. ],
  459. [
  460. "get",
  461. "name:zh"
  462. ],
  463. [
  464. "get",
  465. "name"
  466. ]
  467. ],
  468. "text-font": [
  469. "Microsoft YaHei",
  470. "Microsoft JhengHei",
  471. "Noto Sans CJK SC"
  472. ],
  473. "text-size": 11,
  474. "text-anchor": "top",
  475. "text-offset": [
  476. 0,
  477. 0.7
  478. ]
  479. },
  480. "paint": {
  481. "text-color": "#374151",
  482. "text-halo-color": "rgba(255, 255, 255, 0.96)",
  483. "text-halo-width": 1.2
  484. }
  485. }
  486. ]
  487. }