@trailstash/ultra 3.0.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) hide show
  1. package/.gitlab-ci.yml +15 -0
  2. package/Examples/alt-bbox-format.ultra +9 -0
  3. package/Examples/atp-usps-dropboxes.ultra +68 -0
  4. package/Examples/bike-infra.ultra +111 -0
  5. package/Examples/contribution-heatmap.ultra +17 -0
  6. package/Examples/custom-style.ultra +114 -0
  7. package/Examples/glow-effect.ultra +27 -0
  8. package/Examples/index.md +7 -0
  9. package/Examples/landmarks-prototype.ultra +68 -0
  10. package/Examples/minimalist-ski-map.ultra +55 -0
  11. package/Examples/opentrailstash-3d.ultra +40 -0
  12. package/Examples/overture-landcover-plus-hillshade.ultra +45 -0
  13. package/Examples/overture-places-and-osm.ultra +29 -0
  14. package/Examples/trees.ultra +60 -0
  15. package/Examples/wikidata-photo.ultra +28 -0
  16. package/Examples/within-bounds.ultra +12 -0
  17. package/LICENSE +23 -0
  18. package/MapLibre-Examples/3d-buildings.ultra +43 -0
  19. package/MapLibre-Examples/3d-extrusion-floorplan.ultra +28 -0
  20. package/MapLibre-Examples/3d-terrain.ultra +39 -0
  21. package/MapLibre-Examples/add-image.ultra +26 -0
  22. package/MapLibre-Examples/attribution-position.ultra +12 -0
  23. package/MapLibre-Examples/change-case-of-labels.ultra +26 -0
  24. package/MapLibre-Examples/cluster.ultra +59 -0
  25. package/MapLibre-Examples/cooperative-gestures.ultra +11 -0
  26. package/MapLibre-Examples/custom-marker-icons.ultra +65 -0
  27. package/MapLibre-Examples/data-driven-lines.ultra +169 -0
  28. package/MapLibre-Examples/disable-rotation.ultra +11 -0
  29. package/MapLibre-Examples/disable-scroll-zoom.ultra +9 -0
  30. package/MapLibre-Examples/display-and-style-rich-text-labels.ultra +22 -0
  31. package/MapLibre-Examples/fill-pattern.ultra +43 -0
  32. package/MapLibre-Examples/fullscreen.ultra +10 -0
  33. package/MapLibre-Examples/geojson-layer-in-stack.ultra +23 -0
  34. package/MapLibre-Examples/geojson-line.ultra +114 -0
  35. package/MapLibre-Examples/geojson-markers.ultra +217 -0
  36. package/MapLibre-Examples/geojson-polygon.ultra +104 -0
  37. package/MapLibre-Examples/heatmap-layer.ultra +111 -0
  38. package/MapLibre-Examples/index.md +4 -0
  39. package/MapLibre-Examples/locate-user.ultra +14 -0
  40. package/MapLibre-Examples/map-tiles.ultra +9 -0
  41. package/MapLibre-Examples/pmtiles.ultra +25 -0
  42. package/MapLibre-Examples/wms.ultra +14 -0
  43. package/README.md +46 -0
  44. package/bin/dev.cmd +3 -0
  45. package/bin/dev.js +6 -0
  46. package/bin/run.cmd +3 -0
  47. package/bin/run.js +5 -0
  48. package/build-examples-docs.js +104 -0
  49. package/build-examples-images.js +87 -0
  50. package/build-sprites.sh +30 -0
  51. package/cli/build.js +53 -0
  52. package/cli/serve.js +34 -0
  53. package/components/button-modal.js +111 -0
  54. package/components/button.css +22 -0
  55. package/components/button.js +6 -0
  56. package/components/code-editor.js +87 -0
  57. package/components/download-button.js +69 -0
  58. package/components/fontawesome-icon.js +80 -0
  59. package/components/fs-button.js +52 -0
  60. package/components/help-modal.js +98 -0
  61. package/components/map-popup.js +57 -0
  62. package/components/nav-bar.js +76 -0
  63. package/components/run-button.js +78 -0
  64. package/components/share-button.js +35 -0
  65. package/components/share-modal.js +139 -0
  66. package/components/style-picker.js +47 -0
  67. package/components/ultra-ide.js +298 -0
  68. package/components/ultra-loader.js +60 -0
  69. package/components/ultra-map.js +312 -0
  70. package/configs/minimal.js +9 -0
  71. package/configs/overpass-ultra.js +185 -0
  72. package/docs/assets/Examples/alt-bbox-format.png +0 -0
  73. package/docs/assets/Examples/atp-usps-dropboxes.png +0 -0
  74. package/docs/assets/Examples/bike-infra.png +0 -0
  75. package/docs/assets/Examples/contribution-heatmap.png +0 -0
  76. package/docs/assets/Examples/custom-style.png +0 -0
  77. package/docs/assets/Examples/glow-effect.png +0 -0
  78. package/docs/assets/Examples/landmarks-prototype.png +0 -0
  79. package/docs/assets/Examples/minimalist-ski-map.png +0 -0
  80. package/docs/assets/Examples/opentrailstash-3d.png +0 -0
  81. package/docs/assets/Examples/overture-landcover-plus-hillshade.png +0 -0
  82. package/docs/assets/Examples/overture-places-and-osm.png +0 -0
  83. package/docs/assets/Examples/trees.png +0 -0
  84. package/docs/assets/Examples/wikidata-photo.png +0 -0
  85. package/docs/assets/Examples/within-bounds.png +0 -0
  86. package/docs/assets/MapLibre-Examples/3d-buildings.png +0 -0
  87. package/docs/assets/MapLibre-Examples/3d-extrusion-floorplan.png +0 -0
  88. package/docs/assets/MapLibre-Examples/3d-terrain.png +0 -0
  89. package/docs/assets/MapLibre-Examples/add-image.png +0 -0
  90. package/docs/assets/MapLibre-Examples/attribution-position.png +0 -0
  91. package/docs/assets/MapLibre-Examples/change-case-of-labels.png +0 -0
  92. package/docs/assets/MapLibre-Examples/cluster.png +0 -0
  93. package/docs/assets/MapLibre-Examples/cooperative-gestures.png +0 -0
  94. package/docs/assets/MapLibre-Examples/custom-marker-icons.png +0 -0
  95. package/docs/assets/MapLibre-Examples/data-driven-lines.png +0 -0
  96. package/docs/assets/MapLibre-Examples/disable-rotation.png +0 -0
  97. package/docs/assets/MapLibre-Examples/disable-scroll-zoom.png +0 -0
  98. package/docs/assets/MapLibre-Examples/display-and-style-rich-text-labels.png +0 -0
  99. package/docs/assets/MapLibre-Examples/fill-pattern.png +0 -0
  100. package/docs/assets/MapLibre-Examples/fullscreen.png +0 -0
  101. package/docs/assets/MapLibre-Examples/geojson-layer-in-stack.png +0 -0
  102. package/docs/assets/MapLibre-Examples/geojson-line.png +0 -0
  103. package/docs/assets/MapLibre-Examples/geojson-markers.png +0 -0
  104. package/docs/assets/MapLibre-Examples/geojson-polygon.png +0 -0
  105. package/docs/assets/MapLibre-Examples/heatmap-layer.png +0 -0
  106. package/docs/assets/MapLibre-Examples/locate-user.png +0 -0
  107. package/docs/assets/MapLibre-Examples/map-tiles.png +0 -0
  108. package/docs/assets/MapLibre-Examples/pmtiles.png +0 -0
  109. package/docs/assets/MapLibre-Examples/wms.png +0 -0
  110. package/docs/assets/data/Examples/atp_usps_collection_boxes.geojson +1 -0
  111. package/docs/further-reading.md +15 -0
  112. package/docs/index.md +55 -0
  113. package/docs/overrides/partials/integrations/analytics/custom.html +11 -0
  114. package/docs/query-shortcuts.md +21 -0
  115. package/docs/style.md +120 -0
  116. package/docs/url-parameters.md +45 -0
  117. package/docs/yaml.md +117 -0
  118. package/index.js +53 -0
  119. package/lib/base.css +12 -0
  120. package/lib/bounds.js +8 -0
  121. package/lib/dom.js +21 -0
  122. package/lib/glyphFallback.js +31 -0
  123. package/lib/localStorage.js +34 -0
  124. package/lib/normalize.js +5 -0
  125. package/lib/queryMap.js +50 -0
  126. package/lib/queryParams.js +142 -0
  127. package/lib/queryProviders/auto.js +47 -0
  128. package/lib/queryProviders/geojson.js +134 -0
  129. package/lib/queryProviders/gpx.js +101 -0
  130. package/lib/queryProviders/index.js +22 -0
  131. package/lib/queryProviders/kml.js +132 -0
  132. package/lib/queryProviders/osm.js +199 -0
  133. package/lib/queryProviders/overpass.js +162 -0
  134. package/lib/queryProviders/raster.js +23 -0
  135. package/lib/queryProviders/tcx.js +105 -0
  136. package/lib/queryProviders/vector.js +13 -0
  137. package/lib/settings.js +72 -0
  138. package/lib/sprites.js +18 -0
  139. package/lib/style.js +222 -0
  140. package/mkdocs.yml +26 -0
  141. package/package.json +80 -0
  142. package/screenshot.png +0 -0
  143. package/static/embed.js +18 -0
  144. package/static/font/0-255.pbf +0 -0
  145. package/static/font/1024-1279.pbf +0 -0
  146. package/static/font/10240-10495.pbf +3 -0
  147. package/static/font/10496-10751.pbf +0 -0
  148. package/static/font/10752-11007.pbf +3 -0
  149. package/static/font/11008-11263.pbf +0 -0
  150. package/static/font/11264-11519.pbf +0 -0
  151. package/static/font/11520-11775.pbf +0 -0
  152. package/static/font/11776-12031.pbf +0 -0
  153. package/static/font/12032-12287.pbf +0 -0
  154. package/static/font/12288-12543.pbf +0 -0
  155. package/static/font/12544-12799.pbf +0 -0
  156. package/static/font/1280-1535.pbf +0 -0
  157. package/static/font/12800-13055.pbf +0 -0
  158. package/static/font/13056-13311.pbf +0 -0
  159. package/static/font/13312-13567.pbf +0 -0
  160. package/static/font/13568-13823.pbf +0 -0
  161. package/static/font/13824-14079.pbf +0 -0
  162. package/static/font/14080-14335.pbf +0 -0
  163. package/static/font/14336-14591.pbf +0 -0
  164. package/static/font/14592-14847.pbf +0 -0
  165. package/static/font/14848-15103.pbf +0 -0
  166. package/static/font/15104-15359.pbf +0 -0
  167. package/static/font/1536-1791.pbf +0 -0
  168. package/static/font/15360-15615.pbf +0 -0
  169. package/static/font/15616-15871.pbf +0 -0
  170. package/static/font/15872-16127.pbf +0 -0
  171. package/static/font/16128-16383.pbf +0 -0
  172. package/static/font/16384-16639.pbf +0 -0
  173. package/static/font/16640-16895.pbf +0 -0
  174. package/static/font/16896-17151.pbf +0 -0
  175. package/static/font/17152-17407.pbf +0 -0
  176. package/static/font/17408-17663.pbf +0 -0
  177. package/static/font/17664-17919.pbf +0 -0
  178. package/static/font/1792-2047.pbf +0 -0
  179. package/static/font/17920-18175.pbf +0 -0
  180. package/static/font/18176-18431.pbf +0 -0
  181. package/static/font/18432-18687.pbf +0 -0
  182. package/static/font/18688-18943.pbf +0 -0
  183. package/static/font/18944-19199.pbf +0 -0
  184. package/static/font/19200-19455.pbf +0 -0
  185. package/static/font/19456-19711.pbf +0 -0
  186. package/static/font/19712-19967.pbf +0 -0
  187. package/static/font/19968-20223.pbf +0 -0
  188. package/static/font/20224-20479.pbf +0 -0
  189. package/static/font/2048-2303.pbf +0 -0
  190. package/static/font/20480-20735.pbf +0 -0
  191. package/static/font/20736-20991.pbf +0 -0
  192. package/static/font/20992-21247.pbf +0 -0
  193. package/static/font/21248-21503.pbf +0 -0
  194. package/static/font/21504-21759.pbf +0 -0
  195. package/static/font/21760-22015.pbf +0 -0
  196. package/static/font/22016-22271.pbf +0 -0
  197. package/static/font/22272-22527.pbf +192 -26
  198. package/static/font/22528-22783.pbf +0 -0
  199. package/static/font/22784-23039.pbf +0 -0
  200. package/static/font/2304-2559.pbf +0 -0
  201. package/static/font/23040-23295.pbf +0 -0
  202. package/static/font/23296-23551.pbf +0 -0
  203. package/static/font/23552-23807.pbf +0 -0
  204. package/static/font/23808-24063.pbf +0 -0
  205. package/static/font/24064-24319.pbf +0 -0
  206. package/static/font/24320-24575.pbf +0 -0
  207. package/static/font/24576-24831.pbf +0 -0
  208. package/static/font/24832-25087.pbf +0 -0
  209. package/static/font/25088-25343.pbf +0 -0
  210. package/static/font/25344-25599.pbf +0 -0
  211. package/static/font/256-511.pbf +0 -0
  212. package/static/font/2560-2815.pbf +0 -0
  213. package/static/font/25600-25855.pbf +0 -0
  214. package/static/font/25856-26111.pbf +0 -0
  215. package/static/font/26112-26367.pbf +0 -0
  216. package/static/font/26368-26623.pbf +0 -0
  217. package/static/font/26624-26879.pbf +0 -0
  218. package/static/font/26880-27135.pbf +0 -0
  219. package/static/font/27136-27391.pbf +0 -0
  220. package/static/font/27392-27647.pbf +0 -0
  221. package/static/font/27648-27903.pbf +0 -0
  222. package/static/font/27904-28159.pbf +0 -0
  223. package/static/font/2816-3071.pbf +0 -0
  224. package/static/font/28160-28415.pbf +0 -0
  225. package/static/font/28416-28671.pbf +0 -0
  226. package/static/font/28672-28927.pbf +0 -0
  227. package/static/font/28928-29183.pbf +0 -0
  228. package/static/font/29184-29439.pbf +0 -0
  229. package/static/font/29440-29695.pbf +0 -0
  230. package/static/font/29696-29951.pbf +0 -0
  231. package/static/font/29952-30207.pbf +0 -0
  232. package/static/font/30208-30463.pbf +0 -0
  233. package/static/font/30464-30719.pbf +0 -0
  234. package/static/font/3072-3327.pbf +0 -0
  235. package/static/font/30720-30975.pbf +0 -0
  236. package/static/font/30976-31231.pbf +0 -0
  237. package/static/font/31232-31487.pbf +0 -0
  238. package/static/font/31488-31743.pbf +0 -0
  239. package/static/font/31744-31999.pbf +0 -0
  240. package/static/font/32000-32255.pbf +0 -0
  241. package/static/font/32256-32511.pbf +0 -0
  242. package/static/font/32512-32767.pbf +0 -0
  243. package/static/font/32768-33023.pbf +0 -0
  244. package/static/font/33024-33279.pbf +0 -0
  245. package/static/font/3328-3583.pbf +0 -0
  246. package/static/font/33280-33535.pbf +0 -0
  247. package/static/font/33536-33791.pbf +0 -0
  248. package/static/font/33792-34047.pbf +0 -0
  249. package/static/font/34048-34303.pbf +0 -0
  250. package/static/font/34304-34559.pbf +0 -0
  251. package/static/font/34560-34815.pbf +0 -0
  252. package/static/font/34816-35071.pbf +0 -0
  253. package/static/font/35072-35327.pbf +0 -0
  254. package/static/font/35328-35583.pbf +0 -0
  255. package/static/font/35584-35839.pbf +0 -0
  256. package/static/font/3584-3839.pbf +0 -0
  257. package/static/font/35840-36095.pbf +0 -0
  258. package/static/font/36096-36351.pbf +0 -0
  259. package/static/font/36352-36607.pbf +0 -0
  260. package/static/font/36608-36863.pbf +0 -0
  261. package/static/font/36864-37119.pbf +0 -0
  262. package/static/font/37120-37375.pbf +0 -0
  263. package/static/font/37376-37631.pbf +0 -0
  264. package/static/font/37632-37887.pbf +0 -0
  265. package/static/font/37888-38143.pbf +0 -0
  266. package/static/font/38144-38399.pbf +0 -0
  267. package/static/font/3840-4095.pbf +0 -0
  268. package/static/font/38400-38655.pbf +45 -4
  269. package/static/font/38656-38911.pbf +0 -0
  270. package/static/font/38912-39167.pbf +0 -0
  271. package/static/font/39168-39423.pbf +0 -0
  272. package/static/font/39424-39679.pbf +0 -0
  273. package/static/font/39680-39935.pbf +0 -0
  274. package/static/font/39936-40191.pbf +0 -0
  275. package/static/font/40192-40447.pbf +0 -0
  276. package/static/font/40448-40703.pbf +0 -0
  277. package/static/font/40704-40959.pbf +0 -0
  278. package/static/font/4096-4351.pbf +0 -0
  279. package/static/font/40960-41215.pbf +3 -0
  280. package/static/font/41216-41471.pbf +3 -0
  281. package/static/font/41472-41727.pbf +3 -0
  282. package/static/font/41728-41983.pbf +3 -0
  283. package/static/font/41984-42239.pbf +3 -0
  284. package/static/font/42240-42495.pbf +3 -0
  285. package/static/font/42496-42751.pbf +3 -0
  286. package/static/font/42752-43007.pbf +0 -0
  287. package/static/font/43008-43263.pbf +0 -0
  288. package/static/font/43264-43519.pbf +0 -0
  289. package/static/font/4352-4607.pbf +0 -0
  290. package/static/font/43520-43775.pbf +0 -0
  291. package/static/font/43776-44031.pbf +0 -0
  292. package/static/font/44032-44287.pbf +0 -0
  293. package/static/font/44288-44543.pbf +0 -0
  294. package/static/font/44544-44799.pbf +0 -0
  295. package/static/font/44800-45055.pbf +0 -0
  296. package/static/font/45056-45311.pbf +0 -0
  297. package/static/font/45312-45567.pbf +0 -0
  298. package/static/font/45568-45823.pbf +0 -0
  299. package/static/font/45824-46079.pbf +0 -0
  300. package/static/font/4608-4863.pbf +0 -0
  301. package/static/font/46080-46335.pbf +0 -0
  302. package/static/font/46336-46591.pbf +0 -0
  303. package/static/font/46592-46847.pbf +0 -0
  304. package/static/font/46848-47103.pbf +0 -0
  305. package/static/font/47104-47359.pbf +0 -0
  306. package/static/font/47360-47615.pbf +0 -0
  307. package/static/font/47616-47871.pbf +0 -0
  308. package/static/font/47872-48127.pbf +0 -0
  309. package/static/font/48128-48383.pbf +0 -0
  310. package/static/font/48384-48639.pbf +0 -0
  311. package/static/font/4864-5119.pbf +0 -0
  312. package/static/font/48640-48895.pbf +0 -0
  313. package/static/font/48896-49151.pbf +0 -0
  314. package/static/font/49152-49407.pbf +0 -0
  315. package/static/font/49408-49663.pbf +0 -0
  316. package/static/font/49664-49919.pbf +0 -0
  317. package/static/font/49920-50175.pbf +0 -0
  318. package/static/font/50176-50431.pbf +0 -0
  319. package/static/font/50432-50687.pbf +0 -0
  320. package/static/font/50688-50943.pbf +0 -0
  321. package/static/font/50944-51199.pbf +0 -0
  322. package/static/font/512-767.pbf +0 -0
  323. package/static/font/5120-5375.pbf +3 -0
  324. package/static/font/51200-51455.pbf +0 -0
  325. package/static/font/51456-51711.pbf +0 -0
  326. package/static/font/51712-51967.pbf +0 -0
  327. package/static/font/51968-52223.pbf +0 -0
  328. package/static/font/52224-52479.pbf +0 -0
  329. package/static/font/52480-52735.pbf +0 -0
  330. package/static/font/52736-52991.pbf +0 -0
  331. package/static/font/52992-53247.pbf +0 -0
  332. package/static/font/53248-53503.pbf +0 -0
  333. package/static/font/53504-53759.pbf +0 -0
  334. package/static/font/5376-5631.pbf +3 -0
  335. package/static/font/53760-54015.pbf +0 -0
  336. package/static/font/54016-54271.pbf +0 -0
  337. package/static/font/54272-54527.pbf +0 -0
  338. package/static/font/54528-54783.pbf +0 -0
  339. package/static/font/54784-55039.pbf +0 -0
  340. package/static/font/55040-55295.pbf +0 -0
  341. package/static/font/55296-55551.pbf +3 -0
  342. package/static/font/55552-55807.pbf +3 -0
  343. package/static/font/55808-56063.pbf +3 -0
  344. package/static/font/56064-56319.pbf +3 -0
  345. package/static/font/5632-5887.pbf +3 -0
  346. package/static/font/56320-56575.pbf +3 -0
  347. package/static/font/56576-56831.pbf +3 -0
  348. package/static/font/56832-57087.pbf +3 -0
  349. package/static/font/57088-57343.pbf +3 -0
  350. package/static/font/57344-57599.pbf +3 -0
  351. package/static/font/57600-57855.pbf +3 -0
  352. package/static/font/57856-58111.pbf +3 -0
  353. package/static/font/58112-58367.pbf +3 -0
  354. package/static/font/58368-58623.pbf +3 -0
  355. package/static/font/58624-58879.pbf +3 -0
  356. package/static/font/5888-6143.pbf +0 -0
  357. package/static/font/58880-59135.pbf +3 -0
  358. package/static/font/59136-59391.pbf +3 -0
  359. package/static/font/59392-59647.pbf +3 -0
  360. package/static/font/59648-59903.pbf +3 -0
  361. package/static/font/59904-60159.pbf +3 -0
  362. package/static/font/60160-60415.pbf +3 -0
  363. package/static/font/60416-60671.pbf +3 -0
  364. package/static/font/60672-60927.pbf +3 -0
  365. package/static/font/60928-61183.pbf +3 -0
  366. package/static/font/61184-61439.pbf +3 -0
  367. package/static/font/6144-6399.pbf +0 -0
  368. package/static/font/61440-61695.pbf +3 -0
  369. package/static/font/61696-61951.pbf +3 -0
  370. package/static/font/61952-62207.pbf +3 -0
  371. package/static/font/62208-62463.pbf +3 -0
  372. package/static/font/62464-62719.pbf +3 -0
  373. package/static/font/62720-62975.pbf +3 -0
  374. package/static/font/62976-63231.pbf +3 -0
  375. package/static/font/63232-63487.pbf +3 -0
  376. package/static/font/63488-63743.pbf +3 -0
  377. package/static/font/63744-63999.pbf +0 -0
  378. package/static/font/6400-6655.pbf +0 -0
  379. package/static/font/64000-64255.pbf +0 -0
  380. package/static/font/64256-64511.pbf +0 -0
  381. package/static/font/64512-64767.pbf +0 -0
  382. package/static/font/64768-65023.pbf +0 -0
  383. package/static/font/65024-65279.pbf +0 -0
  384. package/static/font/65280-65535.pbf +0 -0
  385. package/static/font/6656-6911.pbf +3 -0
  386. package/static/font/6912-7167.pbf +0 -0
  387. package/static/font/7168-7423.pbf +0 -0
  388. package/static/font/7424-7679.pbf +0 -0
  389. package/static/font/768-1023.pbf +0 -0
  390. package/static/font/7680-7935.pbf +0 -0
  391. package/static/font/7936-8191.pbf +0 -0
  392. package/static/font/8192-8447.pbf +0 -0
  393. package/static/font/8448-8703.pbf +0 -0
  394. package/static/font/8704-8959.pbf +0 -0
  395. package/static/font/8960-9215.pbf +0 -0
  396. package/static/font/9216-9471.pbf +0 -0
  397. package/static/font/9472-9727.pbf +0 -0
  398. package/static/font/9728-9983.pbf +0 -0
  399. package/static/font/9984-10239.pbf +0 -0
  400. package/static/index.html +59 -0
  401. package/static/logo.png +0 -0
  402. package/static/logo.svg +78 -0
  403. package/static/mapbox-gl-rtl-text@0.2.3.js +9851 -0
  404. package/static/minimal.js +9 -0
  405. package/static/minimal.json +7 -0
  406. package/static/sprites/maki.json +1706 -0
  407. package/static/sprites/maki.license +116 -0
  408. package/static/sprites/maki.png +0 -0
  409. package/static/sprites/maki@2x.json +1706 -0
  410. package/static/sprites/maki@2x.png +0 -0
  411. package/static/sprites/temaki.json +4306 -0
  412. package/static/sprites/temaki.license +118 -0
  413. package/static/sprites/temaki.png +0 -0
  414. package/static/sprites/temaki@2x.json +4306 -0
  415. package/static/sprites/temaki@2x.png +0 -0
@@ -0,0 +1,142 @@
1
+ import {
2
+ compressToEncodedURIComponent,
3
+ decompressFromEncodedURIComponent,
4
+ } from "lz-string";
5
+ import { setSetting } from "./settings.js";
6
+
7
+ export const getModeFromQueryParams = () => {
8
+ const params = new URLSearchParams(window.location.hash.slice(1));
9
+ let mode;
10
+ if (params.has("map")) {
11
+ mode = "map";
12
+ }
13
+ return mode;
14
+ };
15
+
16
+ export const getConfigFromQueryParams = async () => {
17
+ const params = new URLSearchParams(window.location.hash.slice(1));
18
+ if (params.has("config")) {
19
+ const config = params.get("config");
20
+ if (config.endsWith(".js")) {
21
+ return import(new URL(config, window.location));
22
+ } else {
23
+ return (await fetch(new URL(config, window.location))).json();
24
+ }
25
+ }
26
+ };
27
+
28
+ const fetchGist = async (query) => {
29
+ let [gistID, filename] = query.slice("gist:".length).split("/", 2);
30
+ let resp = await fetch(`https://api.github.com/gists/${gistID}`);
31
+ if (!resp.ok) {
32
+ throw new Error(
33
+ `Failed to fetch ${resp.url}: ${resp.status} ${await resp.text()}`,
34
+ );
35
+ }
36
+ const gist = await resp.json();
37
+ if (!filename) {
38
+ for (filename in gist.files) break;
39
+ }
40
+ if (!gist.files[filename].truncated) {
41
+ return gist.files[filename].content;
42
+ }
43
+ resp = await fetch(gist.files[filename].raw_url);
44
+ return resp.text();
45
+ };
46
+ const fetchURL = async (url) => {
47
+ const resp = await fetch(url);
48
+ if (!resp.ok) {
49
+ throw new Error(
50
+ `Failed to fetch ${resp.url}: ${resp.status} ${await resp.text()}`,
51
+ );
52
+ }
53
+ return await resp.text();
54
+ };
55
+
56
+ export const getQueryFromQueryParams = () => {
57
+ const params = new URLSearchParams(window.location.hash.slice(1));
58
+
59
+ let query;
60
+
61
+ // query
62
+ if (params.has("q")) {
63
+ query = decompressFromEncodedURIComponent(params.get("q"));
64
+ } else if (params.has("query")) {
65
+ query = params.get("query");
66
+ if (query.startsWith("gist:")) {
67
+ query = fetchGist(query);
68
+ } else if (query.startsWith("url:")) {
69
+ const url = query.slice("url:".length);
70
+ query = fetchURL(url);
71
+ }
72
+ }
73
+
74
+ // override style & server if provided
75
+ // fetched configs can't be overwritten via style&server params
76
+ if (!query?.then) {
77
+ if (params.has("style")) {
78
+ query = setSetting(query || "", {
79
+ style: params.get("style"),
80
+ });
81
+ }
82
+ if (params.has("server")) {
83
+ query = setSetting(query || "", {
84
+ server: params.get("server"),
85
+ });
86
+ }
87
+ }
88
+
89
+ return query;
90
+ };
91
+
92
+ export const getOptionsFromQueryParams = () => {
93
+ const params = new URLSearchParams(window.location.hash.slice(1));
94
+
95
+ const options = {};
96
+
97
+ // mapview params
98
+ if (params.has("m")) {
99
+ const m = params.get("m");
100
+ if (m.includes(",")) {
101
+ options.bounds = m.split(",").map(parseFloat);
102
+ } else {
103
+ const [zoom, lat, lng] = m.split("/").map(parseFloat);
104
+ options.zoom = zoom;
105
+ options.center = [lng, lat];
106
+ }
107
+ }
108
+
109
+ return options;
110
+ };
111
+
112
+ export const getAutoRunFromQueryParams = () => {
113
+ return new URLSearchParams(window.location.hash.slice(1)).has("run");
114
+ };
115
+
116
+ export const toQueryParams = ({
117
+ query,
118
+ center,
119
+ zoom,
120
+ autoRun = false,
121
+ mode,
122
+ }) => {
123
+ const root = window.location.origin + window.location.pathname;
124
+ const q = compressToEncodedURIComponent(query);
125
+ let hash = "#";
126
+ if (autoRun) {
127
+ hash += "run&";
128
+ }
129
+ if (mode === "map") {
130
+ hash += "map&";
131
+ }
132
+ if (center && zoom) {
133
+ const zyx = [
134
+ zoom.toFixed(2),
135
+ center[1].toFixed(4),
136
+ center[0].toFixed(4),
137
+ ].join("/");
138
+ hash += `m=${zyx}&`;
139
+ }
140
+ hash += `q=${q}`;
141
+ return `${root}${hash}`;
142
+ };
@@ -0,0 +1,47 @@
1
+ export default class AutoProvider {
2
+ #fitBounds;
3
+ #layers;
4
+ #popupContextBuilder;
5
+ #popupTemplate;
6
+ #providers;
7
+
8
+ constructor(providers = {}) {
9
+ //super();
10
+ this.#providers = providers;
11
+ }
12
+
13
+ async source(query, controller, { server, bounds }) {
14
+ console.log(Array.from(Object.keys(this.#providers)));
15
+ for (const [type, provider] of Object.entries(this.#providers)) {
16
+ if (!provider.detect) {
17
+ continue;
18
+ }
19
+ console.log("trying", type);
20
+ if (await Promise.resolve(provider.detect(query, bounds))) {
21
+ console.log("detected", type);
22
+ this.#fitBounds = provider.fitBounds;
23
+ this.#layers = provider.layers;
24
+ this.#popupContextBuilder = provider.popupContextBuilder;
25
+ this.#popupTemplate = provider.popupTemplate;
26
+ return provider.source(query, controller, { server, bounds });
27
+ }
28
+ }
29
+ throw new Error("Could not determine query type!");
30
+ }
31
+
32
+ get fitBounds() {
33
+ return this.#fitBounds;
34
+ }
35
+
36
+ get layers() {
37
+ return this.#layers;
38
+ }
39
+
40
+ get popupContextBuilder() {
41
+ return this.#popupContextBuilder;
42
+ }
43
+
44
+ get popupTemplate() {
45
+ return this.#popupTemplate;
46
+ }
47
+ }
@@ -0,0 +1,134 @@
1
+ const layers = (source) => [
2
+ {
3
+ id: `${source}-geojson-fill`,
4
+ type: "fill",
5
+ source,
6
+ filter: ["==", ["geometry-type"], "Polygon"],
7
+ paint: {
8
+ "fill-color": ["coalesce", ["get", "fill"], "#555"],
9
+ "fill-opacity": ["coalesce", ["get", "fill-opacity"], 0.3],
10
+ },
11
+ },
12
+ {
13
+ id: `${source}-geojson-fill-outline`,
14
+ type: "line",
15
+ source,
16
+ filter: ["==", ["geometry-type"], "Polygon"],
17
+ layout: { "line-cap": "round" },
18
+ paint: {
19
+ "line-color": ["coalesce", ["get", "stroke"], "#555"],
20
+ "line-width": ["coalesce", ["get", "stroke-width"], 2],
21
+ "line-opacity": ["coalesce", ["get", "stroke-opacity"], 1],
22
+ },
23
+ },
24
+ {
25
+ id: `${source}-geojson-line-2`,
26
+ type: "line",
27
+ source,
28
+ filter: ["==", ["geometry-type"], "LineString"],
29
+ layout: { "line-cap": "round" },
30
+ paint: {
31
+ "line-color": ["coalesce", ["get", "stroke"], "#555"],
32
+ "line-width": ["coalesce", ["get", "stroke-width"], 2],
33
+ "line-opacity": ["coalesce", ["get", "stroke-opacity"], 1],
34
+ },
35
+ },
36
+ {
37
+ id: `${source}-geojson-point`,
38
+ type: "symbol",
39
+ source,
40
+ filter: ["==", ["geometry-type"], "Point"],
41
+ layout: {
42
+ "icon-overlap": "always",
43
+ "icon-size": [
44
+ "case",
45
+ ["==", ["get", "marker-size"], "large"],
46
+ 1.5,
47
+ ["==", ["get", "marker-size"], "medium"],
48
+ 1,
49
+ ["==", ["get", "marker-size"], "small"],
50
+ 0.75,
51
+ 1,
52
+ ],
53
+ "icon-anchor": [
54
+ "case",
55
+ ["!", ["has", "marker-symbol"]],
56
+ "bottom",
57
+ ["==", ["get", "marker-symbol"], "marker"],
58
+ "bottom",
59
+ ["==", ["get", "marker-symbol"], "marker-stroked"],
60
+ "bottom",
61
+ "center",
62
+ ],
63
+ "icon-image": [
64
+ "coalesce",
65
+ ["image", ["concat", "maki:", ["get", "marker-symbol"]]],
66
+ ["image", "maki:marker"],
67
+ ],
68
+ },
69
+ paint: {
70
+ "icon-color": ["coalesce", ["get", "marker-color"], "#555"],
71
+ "icon-halo-color": ["coalesce", ["get", "stroke-color"], "#fff"],
72
+ "icon-halo-width": [
73
+ "coalesce",
74
+ ["get", "stroke-width"],
75
+ [
76
+ "case",
77
+ ["==", ["get", "marker-size"], "large"],
78
+ 3,
79
+ ["==", ["get", "marker-size"], "medium"],
80
+ 1.5,
81
+ ["==", ["get", "marker-size"], "small"],
82
+ 1,
83
+ 1.5,
84
+ ],
85
+ ],
86
+ },
87
+ },
88
+ ];
89
+
90
+ export default {
91
+ source: async function geojson(query, controller) {
92
+ let data;
93
+ try {
94
+ data = JSON.parse(query);
95
+ } catch {
96
+ const resp = await fetch(query, { signal: controller.signal });
97
+ data = await resp.json();
98
+ }
99
+ return { type: "geojson", data, generateId: true };
100
+ },
101
+ layers,
102
+ fitBounds: true,
103
+ detect,
104
+ };
105
+
106
+ // Local and Remote GeoJSON are detected by checking for valid GeoJSON types in a JSON document
107
+ const geoJsonTypes = [
108
+ "Feature",
109
+ "FeatureCollection",
110
+ "Geometry",
111
+ "GeometryCollection",
112
+ "Point",
113
+ "MultiPoint",
114
+ "LineString",
115
+ "MultiLineString",
116
+ "Polygon",
117
+ "MultiPolygon",
118
+ ];
119
+ async function detect(query) {
120
+ try {
121
+ if (query.startsWith("https://")) {
122
+ const resp = await fetch(query, { cors: true });
123
+ if (resp.ok) {
124
+ query = await resp.text();
125
+ }
126
+ }
127
+ } catch {}
128
+ try {
129
+ const json = JSON.parse(query);
130
+ if (geoJsonTypes.includes(json.type)) {
131
+ return query;
132
+ }
133
+ } catch {}
134
+ }
@@ -0,0 +1,101 @@
1
+ import { gpx } from "@tmcw/togeojson";
2
+
3
+ const layers = (source) => [
4
+ {
5
+ id: "ultra-gpx-line-casing",
6
+ type: "line",
7
+ source: "ultra",
8
+ layout: {
9
+ "line-cap": "round",
10
+ "line-join": "round",
11
+ },
12
+ paint: {
13
+ "line-color": "rgb(164, 112, 179)",
14
+ "line-opacity": 0.8,
15
+ "line-width": 2,
16
+ "line-gap-width": 5,
17
+ },
18
+ },
19
+ {
20
+ id: "ultra-gpx-line",
21
+ type: "line",
22
+ source: "ultra",
23
+ layout: {
24
+ "line-cap": "round",
25
+ "line-join": "round",
26
+ },
27
+ paint: {
28
+ "line-color": "rgb(226, 126, 255)",
29
+ "line-opacity": 0.5,
30
+ "line-width": 5,
31
+ },
32
+ },
33
+ {
34
+ id: `${source}-gpx-dir`,
35
+ type: "symbol",
36
+ source,
37
+ filter: ["==", ["geometry-type"], "LineString"],
38
+ layout: {
39
+ "symbol-placement": "line",
40
+ "symbol-spacing": 50,
41
+ "icon-image": "maki:triangle",
42
+ "icon-rotate": 90,
43
+ "icon-size": 0.3,
44
+ },
45
+ paint: {
46
+ "icon-color": "rgb(164, 112, 179)",
47
+ "icon-halo-color": "rgb(226, 126, 255)",
48
+ "icon-halo-width": 1,
49
+ },
50
+ },
51
+ /*
52
+ {
53
+ id: `${source}-gpx-poi`,
54
+ type: "symbol",
55
+ source,
56
+ filter: ["==", ["geometry-type"], "Point"],
57
+ layout: {
58
+ "icon-overlap": "always",
59
+ "icon-size": 0.5,
60
+ "icon-anchor": "bottom",
61
+ "icon-image": ["concat", "https://corsproxy.io/?", ["get", "icon"]],
62
+ },
63
+ },
64
+ */
65
+ ];
66
+
67
+ const detect = async (query) => {
68
+ try {
69
+ if (query.startsWith("https://")) {
70
+ const resp = await fetch(query, { cors: true });
71
+ if (resp.ok) {
72
+ query = await resp.text();
73
+ }
74
+ }
75
+ } catch {}
76
+ const doc = new window.DOMParser().parseFromString(query, "text/xml");
77
+ if (
78
+ !doc.querySelector("parsererror") &&
79
+ doc.childNodes[0].nodeName === "gpx"
80
+ ) {
81
+ return query;
82
+ }
83
+ };
84
+
85
+ export default {
86
+ source: async function (query, controller) {
87
+ let doc = new window.DOMParser().parseFromString(query, "text/xml");
88
+ if (doc.querySelector("parsererror")) {
89
+ const resp = await fetch(query.trim(), { signal: controller.signal });
90
+ doc = new window.DOMParser().parseFromString(
91
+ await resp.text(),
92
+ "text/xml",
93
+ );
94
+ }
95
+ const data = gpx(doc);
96
+ return { type: "geojson", data, generateId: true };
97
+ },
98
+ layers,
99
+ detect,
100
+ fitBounds: true,
101
+ };
@@ -0,0 +1,22 @@
1
+ import overpass, { osmWebsite, osmWiki } from "./overpass.js";
2
+ import geojson from "./geojson.js";
3
+ import raster from "./raster.js";
4
+ import vector from "./vector.js";
5
+ import { osmxml, osmjson } from "./osm.js";
6
+ import kml from "./kml.js";
7
+ import gpx from "./gpx.js";
8
+ import tcx from "./tcx.js";
9
+
10
+ export default {
11
+ overpass,
12
+ osmWebsite,
13
+ osmWiki,
14
+ geojson,
15
+ osmxml,
16
+ osmjson,
17
+ kml,
18
+ gpx,
19
+ tcx,
20
+ raster,
21
+ vector,
22
+ };
@@ -0,0 +1,132 @@
1
+ import { kml } from "@tmcw/togeojson";
2
+
3
+ const layers = (source) => [
4
+ {
5
+ id: `${source}-geojson-fill`,
6
+ type: "fill",
7
+ source,
8
+ filter: ["==", ["geometry-type"], "Polygon"],
9
+ paint: {
10
+ "fill-color": ["coalesce", ["get", "fill"], "#555"],
11
+ "fill-opacity": ["coalesce", ["get", "fill-opacity"], 0.3],
12
+ },
13
+ },
14
+ {
15
+ id: `${source}-geojson-fill-outline`,
16
+ type: "line",
17
+ source,
18
+ filter: ["==", ["geometry-type"], "Polygon"],
19
+ paint: {
20
+ "line-color": ["coalesce", ["get", "stroke"], "#555"],
21
+ "line-width": ["coalesce", ["get", "stroke-width"], 2],
22
+ "line-opacity": ["coalesce", ["get", "stroke-opacity"], 1],
23
+ },
24
+ layout: {
25
+ "line-join": "round",
26
+ "line-cap": "round",
27
+ },
28
+ },
29
+ {
30
+ id: `${source}-geojson-line-2`,
31
+ type: "line",
32
+ source,
33
+ filter: ["==", ["geometry-type"], "LineString"],
34
+ paint: {
35
+ "line-color": ["coalesce", ["get", "stroke"], "#555"],
36
+ "line-width": ["coalesce", ["get", "stroke-width"], 2],
37
+ "line-opacity": ["coalesce", ["get", "stroke-opacity"], 1],
38
+ },
39
+ layout: {
40
+ "line-join": "round",
41
+ "line-cap": "round",
42
+ },
43
+ },
44
+ {
45
+ id: `${source}-geojson-point`,
46
+ type: "symbol",
47
+ source,
48
+ filter: ["==", ["geometry-type"], "Point"],
49
+ layout: {
50
+ "icon-overlap": "always",
51
+ "icon-size": ["coalesce", ["get", "icon-scale"], 1],
52
+ "icon-anchor": "bottom",
53
+ "icon-image": "maki:marker",
54
+ },
55
+ paint: {
56
+ "icon-color": ["coalesce", ["get", "icon-color"], "#555"],
57
+ "icon-halo-color": ["coalesce", ["get", "stroke-color"], "#fff"],
58
+ "icon-halo-width": [
59
+ "coalesce",
60
+ ["get", "stroke-width"],
61
+ [
62
+ "case",
63
+ ["==", ["get", "marker-size"], "large"],
64
+ 3,
65
+ ["==", ["get", "marker-size"], "medium"],
66
+ 1.5,
67
+ ["==", ["get", "marker-size"], "small"],
68
+ 1,
69
+ 1.5,
70
+ ],
71
+ ],
72
+ },
73
+ },
74
+ ];
75
+
76
+ const detect = async (query) => {
77
+ if (query.startsWith("https://www.google.com/maps/d/")) {
78
+ return true;
79
+ }
80
+ if (query.startsWith("https://")) {
81
+ try {
82
+ const resp = await fetch(query, { cors: true });
83
+ if (resp.ok) {
84
+ query = await resp.text();
85
+ } else {
86
+ return false;
87
+ }
88
+ } catch {
89
+ return false;
90
+ }
91
+ }
92
+ const doc = new window.DOMParser().parseFromString(query, "text/xml");
93
+ return (
94
+ !doc.querySelector("parsererror") && doc.childNodes[0].nodeName === "kml"
95
+ );
96
+ };
97
+
98
+ export default {
99
+ source: async function (query, controller) {
100
+ if (query.startsWith("https://www.google.com/maps/d/")) {
101
+ const url = new URL(query);
102
+ const mid = url.searchParams.get("mid");
103
+ if (mid) {
104
+ query = `https://www.google.com/maps/d/kml?mid=${mid}&forcekml=1`;
105
+ }
106
+ }
107
+ let doc = new window.DOMParser().parseFromString(query, "text/xml");
108
+ if (doc.querySelector("parsererror")) {
109
+ const resp = await fetch(query.trim(), { signal: controller.signal });
110
+ doc = new window.DOMParser().parseFromString(
111
+ await resp.text(),
112
+ "text/xml",
113
+ );
114
+ }
115
+ const data = kml(doc);
116
+ return { type: "geojson", data, generateId: true };
117
+ },
118
+ layers,
119
+ popupTemplate: `
120
+ <h2>{{properties.name}}</h2>
121
+ <p>{{properties.description}}</p>
122
+ <details>
123
+ <summary>Properties</summary>
124
+ {%- for prop in properties %}
125
+ <code>{{ prop[0] }} = {{ prop[1] }}</code>
126
+ <br>
127
+ {%- endfor %}
128
+ </details>
129
+ `,
130
+ detect,
131
+ fitBounds: true,
132
+ };