@npm9912/v-map 0.1.0

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 (438) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -0
  3. package/dist/cjs/_commonjsHelpers-B83fTs8d.js +36 -0
  4. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  5. package/dist/cjs/cesium-provider-BiFFyAl9.js +2598 -0
  6. package/dist/cjs/deck-provider-Ctq3Q8a1.js +47824 -0
  7. package/dist/cjs/geotiff-CEwvF9cG.js +47 -0
  8. package/dist/cjs/geotiff-source-RaNzzWkC.js +1522 -0
  9. package/dist/cjs/index-B1oGO1g-.js +10658 -0
  10. package/dist/cjs/index-B8LHqjyg.js +1765 -0
  11. package/dist/cjs/index-BIL4VsgP.js +310 -0
  12. package/dist/cjs/index-Blku2QY8.js +167 -0
  13. package/dist/cjs/index-CJvvX4yx.js +21 -0
  14. package/dist/cjs/index-CbVT-Con.js +699 -0
  15. package/dist/cjs/index-ISOEpMC3.js +20478 -0
  16. package/dist/cjs/index-JSwBbvGA.js +1621 -0
  17. package/dist/cjs/index.browser-DQhD8Jwl.js +6873 -0
  18. package/dist/cjs/index.cjs.js +2 -0
  19. package/dist/cjs/layer-extension-B_olS0rc.js +65 -0
  20. package/dist/cjs/leaflet-provider-DOqfs7g5.js +1815 -0
  21. package/dist/cjs/loader.cjs.js +13 -0
  22. package/dist/cjs/main-dist-7TykwFci.js +2655 -0
  23. package/dist/cjs/messages-D7h4m8Tx.js +186 -0
  24. package/dist/cjs/openlayers-provider-Dfeg6L4n.js +1604 -0
  25. package/dist/cjs/polygon-layer-B9PrN7vr.js +1300 -0
  26. package/dist/cjs/scenegraph-layer-DwNoxQdi.js +2530 -0
  27. package/dist/cjs/styleconfig-CVRqArk-.js +23 -0
  28. package/dist/cjs/v-map-builder.cjs.entry.js +3786 -0
  29. package/dist/cjs/v-map-layer-geojson_12.cjs.entry.js +40894 -0
  30. package/dist/cjs/v-map-layer-helper-iAzxAg9I.js +285 -0
  31. package/dist/cjs/v-map-layer-terrain-geotiff.cjs.entry.js +258 -0
  32. package/dist/cjs/v-map-layercontrol.cjs.entry.js +247 -0
  33. package/dist/cjs/v-map.cjs.js +25 -0
  34. package/dist/cjs/v-map.v-map-layer-osm.v-map-layergroup-BsXp3BoL.js +582 -0
  35. package/dist/cjs/v-map_3.cjs.entry.js +12 -0
  36. package/dist/collection/collection-manifest.json +30 -0
  37. package/dist/collection/components/v-map/v-map.css +3 -0
  38. package/dist/collection/components/v-map/v-map.js +467 -0
  39. package/dist/collection/components/v-map/v-map.test.js +33 -0
  40. package/dist/collection/components/v-map-builder/v-map-builder.css +1 -0
  41. package/dist/collection/components/v-map-builder/v-map-builder.js +913 -0
  42. package/dist/collection/components/v-map-builder/v-map-builder.test.js +56 -0
  43. package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.js +862 -0
  44. package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.test.js +42 -0
  45. package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.css +4 -0
  46. package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.js +500 -0
  47. package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.test.js +38 -0
  48. package/dist/collection/components/v-map-layer-google/v-map-layer-google.css +1 -0
  49. package/dist/collection/components/v-map-layer-google/v-map-layer-google.js +442 -0
  50. package/dist/collection/components/v-map-layer-osm/error-api.test.js +108 -0
  51. package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.css +4 -0
  52. package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.js +311 -0
  53. package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.test.js +36 -0
  54. package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.css +1 -0
  55. package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.js +305 -0
  56. package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.css +3 -0
  57. package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.js +548 -0
  58. package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.test.js +36 -0
  59. package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.css +3 -0
  60. package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js +735 -0
  61. package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.js +42 -0
  62. package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.css +3 -0
  63. package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.js +449 -0
  64. package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.test.js +50 -0
  65. package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.css +1 -0
  66. package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.js +448 -0
  67. package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.test.js +39 -0
  68. package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.css +1 -0
  69. package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.js +489 -0
  70. package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.test.js +43 -0
  71. package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.css +1 -0
  72. package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.js +811 -0
  73. package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.test.js +34 -0
  74. package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.css +1 -0
  75. package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.js +453 -0
  76. package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.test.js +36 -0
  77. package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.css +1 -0
  78. package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.js +331 -0
  79. package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.test.js +28 -0
  80. package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.css +74 -0
  81. package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.js +277 -0
  82. package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.test.js +134 -0
  83. package/dist/collection/components/v-map-layergroup/v-map-layergroup.css +4 -0
  84. package/dist/collection/components/v-map-layergroup/v-map-layergroup.js +212 -0
  85. package/dist/collection/components/v-map-layergroup/v-map-layergroup.test.js +39 -0
  86. package/dist/collection/components/v-map-style/v-map-style.css +38 -0
  87. package/dist/collection/components/v-map-style/v-map-style.js +492 -0
  88. package/dist/collection/components/v-map-style/v-map-style.unit.js +62 -0
  89. package/dist/collection/index.js +1 -0
  90. package/dist/collection/layer/v-map-layer-helper.js +281 -0
  91. package/dist/collection/layer/v-map-layer-helper.unit.js +234 -0
  92. package/dist/collection/lib/cesium-loader.js +58 -0
  93. package/dist/collection/lib/ensure-importmap.js +12 -0
  94. package/dist/collection/lib/ensure-importmap.unit.js +57 -0
  95. package/dist/collection/lib/versions.gen.js +6 -0
  96. package/dist/collection/lib/vstyle.js +8 -0
  97. package/dist/collection/map-provider/cesium/CesiumGeoTIFFTerrainProvider.js +285 -0
  98. package/dist/collection/map-provider/cesium/CesiumLayerGroups.js +159 -0
  99. package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.js +192 -0
  100. package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.test.js +57 -0
  101. package/dist/collection/map-provider/cesium/cesium-provider.js +1408 -0
  102. package/dist/collection/map-provider/cesium/i-layer.js +1 -0
  103. package/dist/collection/map-provider/cesium/layer-manager.js +467 -0
  104. package/dist/collection/map-provider/deck/DeckGLGeoTIFFLayer.js +483 -0
  105. package/dist/collection/map-provider/deck/DeckGLGeoTIFFTerrainLayer.js +410 -0
  106. package/dist/collection/map-provider/deck/LayerGroupWithModel.js +169 -0
  107. package/dist/collection/map-provider/deck/LayerGroups.js +192 -0
  108. package/dist/collection/map-provider/deck/LayerModel.js +1 -0
  109. package/dist/collection/map-provider/deck/RenderableGroup.js +1 -0
  110. package/dist/collection/map-provider/deck/deck-provider.js +1563 -0
  111. package/dist/collection/map-provider/geotiff/geotiff-source.js +172 -0
  112. package/dist/collection/map-provider/geotiff/utils/AABB2D.js +24 -0
  113. package/dist/collection/map-provider/geotiff/utils/BVHNode2D.js +166 -0
  114. package/dist/collection/map-provider/geotiff/utils/GeoTIFFTileProcessor.js +484 -0
  115. package/dist/collection/map-provider/geotiff/utils/Triangle.js +1 -0
  116. package/dist/collection/map-provider/geotiff/utils/Triangulation.js +321 -0
  117. package/dist/collection/map-provider/geotiff/utils/colormap-utils.js +190 -0
  118. package/dist/collection/map-provider/geotiff/utils/normalization-utils.js +122 -0
  119. package/dist/collection/map-provider/geotiff/utils/sampling-utils.js +108 -0
  120. package/dist/collection/map-provider/leaflet/GeoTIFFGridLayer.js +147 -0
  121. package/dist/collection/map-provider/leaflet/WCSGridLayer.js +124 -0
  122. package/dist/collection/map-provider/leaflet/google-map-tiles-layer.js +352 -0
  123. package/dist/collection/map-provider/leaflet/leaflet-helpers.js +94 -0
  124. package/dist/collection/map-provider/leaflet/leaflet-provider.js +1095 -0
  125. package/dist/collection/map-provider/ol/CustomGeoTiff.js +145 -0
  126. package/dist/collection/map-provider/ol/openlayers-helper.js +26 -0
  127. package/dist/collection/map-provider/ol/openlayers-provider.js +1427 -0
  128. package/dist/collection/map-provider/provider-factory.js +44 -0
  129. package/dist/collection/map-provider/provider-factory.unit.js +66 -0
  130. package/dist/collection/testing/browser-test-utils.js +49 -0
  131. package/dist/collection/testing/e2e-testing.js +122 -0
  132. package/dist/collection/testing/e2e-utils.js +70 -0
  133. package/dist/collection/testing/geotiff-test-server.js +100 -0
  134. package/dist/collection/testing/mocks/geostyler-lyrx-parser.js +12 -0
  135. package/dist/collection/testing/mocks/geostyler-mapbox-parser.js +12 -0
  136. package/dist/collection/testing/mocks/geostyler-qgis-parser.js +12 -0
  137. package/dist/collection/testing/mocks/geostyler-sld-parser.js +13 -0
  138. package/dist/collection/testing/mocks/geostyler-style.js +5 -0
  139. package/dist/collection/testing/setupTests.browser.js +1 -0
  140. package/dist/collection/testing/setupTests.stencil.js +20 -0
  141. package/dist/collection/testing/setupTests.vitest.js +59 -0
  142. package/dist/collection/testing/stencil-testing-wrapper.js +43 -0
  143. package/dist/collection/testing/styleMock.js +1 -0
  144. package/dist/collection/types/color.js +1 -0
  145. package/dist/collection/types/cssmode.js +1 -0
  146. package/dist/collection/types/flavour.js +1 -0
  147. package/dist/collection/types/layerconfig.js +1 -0
  148. package/dist/collection/types/lonlat.js +1 -0
  149. package/dist/collection/types/mapinitoptions.js +1 -0
  150. package/dist/collection/types/mapprovider.js +1 -0
  151. package/dist/collection/types/provideroptions.js +1 -0
  152. package/dist/collection/types/styleconfig.js +19 -0
  153. package/dist/collection/types/styling.js +13 -0
  154. package/dist/collection/types/styling.unit.js +37 -0
  155. package/dist/collection/types/vmaplayer.js +1 -0
  156. package/dist/collection/utils/async-mutex.js +28 -0
  157. package/dist/collection/utils/diff.js +142 -0
  158. package/dist/collection/utils/diff.unit.js +59 -0
  159. package/dist/collection/utils/dom-env.js +43 -0
  160. package/dist/collection/utils/dom-env.unit.js +92 -0
  161. package/dist/collection/utils/events.js +8 -0
  162. package/dist/collection/utils/logger.js +183 -0
  163. package/dist/collection/utils/logger.unit.js +98 -0
  164. package/dist/collection/utils/messages.js +12 -0
  165. package/dist/collection/utils/spatial-utils.js +27 -0
  166. package/dist/collection/utils/spatial-utils.unit.js +24 -0
  167. package/dist/components/_commonjsHelpers.js +1 -0
  168. package/dist/components/cesium-provider.js +1 -0
  169. package/dist/components/deck-provider.js +1 -0
  170. package/dist/components/events.js +1 -0
  171. package/dist/components/geotiff-source.js +1 -0
  172. package/dist/components/geotiff.js +4 -0
  173. package/dist/components/index.browser.js +15 -0
  174. package/dist/components/index.d.ts +35 -0
  175. package/dist/components/index.js +1 -0
  176. package/dist/components/index2.js +1 -0
  177. package/dist/components/index3.js +1 -0
  178. package/dist/components/index4.js +1 -0
  179. package/dist/components/index5.js +1 -0
  180. package/dist/components/index6.js +1 -0
  181. package/dist/components/index7.js +1 -0
  182. package/dist/components/index8.js +7 -0
  183. package/dist/components/layer-extension.js +1 -0
  184. package/dist/components/leaflet-provider.js +1 -0
  185. package/dist/components/main-dist.js +1 -0
  186. package/dist/components/messages.js +1 -0
  187. package/dist/components/openlayers-provider.js +1 -0
  188. package/dist/components/polygon-layer.js +1 -0
  189. package/dist/components/scenegraph-layer.js +1 -0
  190. package/dist/components/styleconfig.js +1 -0
  191. package/dist/components/styling.js +1 -0
  192. package/dist/components/v-map-builder.d.ts +11 -0
  193. package/dist/components/v-map-builder.js +2 -0
  194. package/dist/components/v-map-layer-geojson.d.ts +11 -0
  195. package/dist/components/v-map-layer-geojson.js +1 -0
  196. package/dist/components/v-map-layer-geojson2.js +1 -0
  197. package/dist/components/v-map-layer-geotiff.d.ts +11 -0
  198. package/dist/components/v-map-layer-geotiff.js +1 -0
  199. package/dist/components/v-map-layer-geotiff2.js +1 -0
  200. package/dist/components/v-map-layer-google.d.ts +11 -0
  201. package/dist/components/v-map-layer-google.js +1 -0
  202. package/dist/components/v-map-layer-google2.js +1 -0
  203. package/dist/components/v-map-layer-helper.js +1 -0
  204. package/dist/components/v-map-layer-osm.d.ts +11 -0
  205. package/dist/components/v-map-layer-osm.js +1 -0
  206. package/dist/components/v-map-layer-osm2.js +1 -0
  207. package/dist/components/v-map-layer-scatterplot.d.ts +11 -0
  208. package/dist/components/v-map-layer-scatterplot.js +1 -0
  209. package/dist/components/v-map-layer-scatterplot2.js +1 -0
  210. package/dist/components/v-map-layer-terrain-geotiff.d.ts +11 -0
  211. package/dist/components/v-map-layer-terrain-geotiff.js +1 -0
  212. package/dist/components/v-map-layer-terrain.d.ts +11 -0
  213. package/dist/components/v-map-layer-terrain.js +1 -0
  214. package/dist/components/v-map-layer-terrain2.js +1 -0
  215. package/dist/components/v-map-layer-tile3d.d.ts +11 -0
  216. package/dist/components/v-map-layer-tile3d.js +1 -0
  217. package/dist/components/v-map-layer-tile3d2.js +1 -0
  218. package/dist/components/v-map-layer-wcs.d.ts +11 -0
  219. package/dist/components/v-map-layer-wcs.js +1 -0
  220. package/dist/components/v-map-layer-wcs2.js +1 -0
  221. package/dist/components/v-map-layer-wfs.d.ts +11 -0
  222. package/dist/components/v-map-layer-wfs.js +1 -0
  223. package/dist/components/v-map-layer-wfs2.js +1 -0
  224. package/dist/components/v-map-layer-wkt.d.ts +11 -0
  225. package/dist/components/v-map-layer-wkt.js +1 -0
  226. package/dist/components/v-map-layer-wkt2.js +1 -0
  227. package/dist/components/v-map-layer-wms.d.ts +11 -0
  228. package/dist/components/v-map-layer-wms.js +1 -0
  229. package/dist/components/v-map-layer-wms2.js +1 -0
  230. package/dist/components/v-map-layer-xyz.d.ts +11 -0
  231. package/dist/components/v-map-layer-xyz.js +1 -0
  232. package/dist/components/v-map-layer-xyz2.js +1 -0
  233. package/dist/components/v-map-layercontrol.d.ts +11 -0
  234. package/dist/components/v-map-layercontrol.js +1 -0
  235. package/dist/components/v-map-layergroup.d.ts +11 -0
  236. package/dist/components/v-map-layergroup.js +1 -0
  237. package/dist/components/v-map-layergroup2.js +1 -0
  238. package/dist/components/v-map-style.d.ts +11 -0
  239. package/dist/components/v-map-style.js +1 -0
  240. package/dist/components/v-map-style2.js +10 -0
  241. package/dist/components/v-map.d.ts +11 -0
  242. package/dist/components/v-map.js +1 -0
  243. package/dist/components/v-map2.js +1 -0
  244. package/dist/esm/_commonjsHelpers-E-ZsRS8r.js +32 -0
  245. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  246. package/dist/esm/cesium-provider-BJfAup3w.js +2596 -0
  247. package/dist/esm/deck-provider-C7U9VDEq.js +47709 -0
  248. package/dist/esm/geotiff-BEWxTIfH.js +45 -0
  249. package/dist/esm/geotiff-source-esnDnC-u.js +1516 -0
  250. package/dist/esm/index-B1zwA4IC.js +685 -0
  251. package/dist/esm/index-BBpiaTpT.js +165 -0
  252. package/dist/esm/index-BIEmlzCf.js +1697 -0
  253. package/dist/esm/index-BUHa4Jj0.js +307 -0
  254. package/dist/esm/index-DbSdn93t.js +20461 -0
  255. package/dist/esm/index-RpJarvr_.js +10656 -0
  256. package/dist/esm/index-jN06TXUp.js +14 -0
  257. package/dist/esm/index-jzneDarq.js +1613 -0
  258. package/dist/esm/index.browser-DhQAXuA7.js +6860 -0
  259. package/dist/esm/index.js +1 -0
  260. package/dist/esm/layer-extension-CZXK5goK.js +63 -0
  261. package/dist/esm/leaflet-provider-Q41TB6ku.js +1794 -0
  262. package/dist/esm/loader.js +11 -0
  263. package/dist/esm/main-dist-CwnA7_Xn.js +2652 -0
  264. package/dist/esm/messages-CMKJzsgL.js +180 -0
  265. package/dist/esm/openlayers-provider-CMsDsQTQ.js +1602 -0
  266. package/dist/esm/polygon-layer-ByhxGhWC.js +1295 -0
  267. package/dist/esm/scenegraph-layer-09K_B6DT.js +2526 -0
  268. package/dist/esm/styleconfig-B-bAcABs.js +21 -0
  269. package/dist/esm/v-map-builder.entry.js +3784 -0
  270. package/dist/esm/v-map-layer-geojson_12.entry.js +40881 -0
  271. package/dist/esm/v-map-layer-helper-Dys44Cgo.js +283 -0
  272. package/dist/esm/v-map-layer-terrain-geotiff.entry.js +256 -0
  273. package/dist/esm/v-map-layercontrol.entry.js +245 -0
  274. package/dist/esm/v-map.js +21 -0
  275. package/dist/esm/v-map.v-map-layer-osm.v-map-layergroup-B4pFHuSf.js +572 -0
  276. package/dist/esm/v-map_3.entry.js +4 -0
  277. package/dist/index.cjs.js +1 -0
  278. package/dist/index.js +1 -0
  279. package/dist/types/cesium-augment.d.ts +5 -0
  280. package/dist/types/components/v-map/v-map.d.ts +70 -0
  281. package/dist/types/components/v-map/v-map.test.d.ts +1 -0
  282. package/dist/types/components/v-map-builder/v-map-builder.d.ts +48 -0
  283. package/dist/types/components/v-map-builder/v-map-builder.test.d.ts +1 -0
  284. package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.d.ts +129 -0
  285. package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.test.d.ts +1 -0
  286. package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.d.ts +74 -0
  287. package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.test.d.ts +1 -0
  288. package/dist/types/components/v-map-layer-google/v-map-layer-google.d.ts +78 -0
  289. package/dist/types/components/v-map-layer-osm/error-api.test.d.ts +1 -0
  290. package/dist/types/components/v-map-layer-osm/v-map-layer-osm.d.ts +50 -0
  291. package/dist/types/components/v-map-layer-osm/v-map-layer-osm.test.d.ts +1 -0
  292. package/dist/types/components/v-map-layer-scatterplot/v-map-layer-scatterplot.d.ts +54 -0
  293. package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.d.ts +74 -0
  294. package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.test.d.ts +1 -0
  295. package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.d.ts +117 -0
  296. package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.d.ts +1 -0
  297. package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.d.ts +69 -0
  298. package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.test.d.ts +1 -0
  299. package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.d.ts +47 -0
  300. package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.test.d.ts +1 -0
  301. package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.d.ts +59 -0
  302. package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.test.d.ts +1 -0
  303. package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.d.ts +132 -0
  304. package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.test.d.ts +1 -0
  305. package/dist/types/components/v-map-layer-wms/v-map-layer-wms.d.ts +76 -0
  306. package/dist/types/components/v-map-layer-wms/v-map-layer-wms.test.d.ts +1 -0
  307. package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.d.ts +59 -0
  308. package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.test.d.ts +1 -0
  309. package/dist/types/components/v-map-layercontrol/v-map-layercontrol.d.ts +44 -0
  310. package/dist/types/components/v-map-layercontrol/v-map-layercontrol.test.d.ts +1 -0
  311. package/dist/types/components/v-map-layergroup/v-map-layergroup.d.ts +31 -0
  312. package/dist/types/components/v-map-layergroup/v-map-layergroup.test.d.ts +1 -0
  313. package/dist/types/components/v-map-style/v-map-style.d.ts +75 -0
  314. package/dist/types/components/v-map-style/v-map-style.unit.d.ts +1 -0
  315. package/dist/types/components.d.ts +2391 -0
  316. package/dist/types/globals.d.ts +16 -0
  317. package/dist/types/index.d.ts +10 -0
  318. package/dist/types/layer/v-map-layer-helper.d.ts +45 -0
  319. package/dist/types/layer/v-map-layer-helper.unit.d.ts +1 -0
  320. package/dist/types/leaflet-augment.d.ts +15 -0
  321. package/dist/types/lib/cesium-loader.d.ts +3 -0
  322. package/dist/types/lib/ensure-importmap.d.ts +3 -0
  323. package/dist/types/lib/ensure-importmap.unit.d.ts +1 -0
  324. package/dist/types/lib/versions.gen.d.ts +5 -0
  325. package/dist/types/lib/vstyle.d.ts +44 -0
  326. package/dist/types/map-provider/cesium/CesiumGeoTIFFTerrainProvider.d.ts +92 -0
  327. package/dist/types/map-provider/cesium/CesiumLayerGroups.d.ts +64 -0
  328. package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.d.ts +75 -0
  329. package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.test.d.ts +1 -0
  330. package/dist/types/map-provider/cesium/cesium-provider.d.ts +87 -0
  331. package/dist/types/map-provider/cesium/i-layer.d.ts +11 -0
  332. package/dist/types/map-provider/cesium/layer-manager.d.ts +31 -0
  333. package/dist/types/map-provider/deck/DeckGLGeoTIFFLayer.d.ts +91 -0
  334. package/dist/types/map-provider/deck/DeckGLGeoTIFFTerrainLayer.d.ts +82 -0
  335. package/dist/types/map-provider/deck/LayerGroupWithModel.d.ts +55 -0
  336. package/dist/types/map-provider/deck/LayerGroups.d.ts +63 -0
  337. package/dist/types/map-provider/deck/LayerModel.d.ts +8 -0
  338. package/dist/types/map-provider/deck/RenderableGroup.d.ts +20 -0
  339. package/dist/types/map-provider/deck/deck-provider.d.ts +92 -0
  340. package/dist/types/map-provider/geotiff/geotiff-source.d.ts +30 -0
  341. package/dist/types/map-provider/geotiff/utils/AABB2D.d.ts +28 -0
  342. package/dist/types/map-provider/geotiff/utils/BVHNode2D.d.ts +36 -0
  343. package/dist/types/map-provider/geotiff/utils/GeoTIFFTileProcessor.d.ts +116 -0
  344. package/dist/types/map-provider/geotiff/utils/Triangle.d.ts +5 -0
  345. package/dist/types/map-provider/geotiff/utils/Triangulation.d.ts +94 -0
  346. package/dist/types/map-provider/geotiff/utils/colormap-utils.d.ts +47 -0
  347. package/dist/types/map-provider/geotiff/utils/normalization-utils.d.ts +39 -0
  348. package/dist/types/map-provider/geotiff/utils/sampling-utils.d.ts +13 -0
  349. package/dist/types/map-provider/leaflet/GeoTIFFGridLayer.d.ts +34 -0
  350. package/dist/types/map-provider/leaflet/WCSGridLayer.d.ts +38 -0
  351. package/dist/types/map-provider/leaflet/google-map-tiles-layer.d.ts +73 -0
  352. package/dist/types/map-provider/leaflet/leaflet-helpers.d.ts +6 -0
  353. package/dist/types/map-provider/leaflet/leaflet-provider.d.ts +73 -0
  354. package/dist/types/map-provider/ol/CustomGeoTiff.d.ts +14 -0
  355. package/dist/types/map-provider/ol/openlayers-helper.d.ts +2 -0
  356. package/dist/types/map-provider/ol/openlayers-provider.d.ts +80 -0
  357. package/dist/types/map-provider/provider-factory.d.ts +12 -0
  358. package/dist/types/map-provider/provider-factory.unit.d.ts +1 -0
  359. package/dist/types/namespaces.d.ts +3 -0
  360. package/dist/types/ol-augment.d.ts +3 -0
  361. package/dist/types/ol-override.d.ts +7 -0
  362. package/dist/types/ol.d.ts +10 -0
  363. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  364. package/dist/types/testing/browser-test-utils.d.ts +6 -0
  365. package/dist/types/testing/e2e-testing.d.ts +5 -0
  366. package/dist/types/testing/e2e-utils.d.ts +4 -0
  367. package/dist/types/testing/geotiff-test-server.d.ts +5 -0
  368. package/dist/types/testing/mocks/geostyler-lyrx-parser.d.ts +11 -0
  369. package/dist/types/testing/mocks/geostyler-mapbox-parser.d.ts +11 -0
  370. package/dist/types/testing/mocks/geostyler-qgis-parser.d.ts +11 -0
  371. package/dist/types/testing/mocks/geostyler-sld-parser.d.ts +11 -0
  372. package/dist/types/testing/mocks/geostyler-style.d.ts +5 -0
  373. package/dist/types/testing/setupTests.browser.d.ts +1 -0
  374. package/dist/types/testing/setupTests.stencil.d.ts +1 -0
  375. package/dist/types/testing/setupTests.vitest.d.ts +1 -0
  376. package/dist/types/testing/stencil-testing-wrapper.d.ts +3 -0
  377. package/dist/types/types/color.d.ts +1 -0
  378. package/dist/types/types/cssmode.d.ts +1 -0
  379. package/dist/types/types/flavour.d.ts +1 -0
  380. package/dist/types/types/layerconfig.d.ts +207 -0
  381. package/dist/types/types/lonlat.d.ts +1 -0
  382. package/dist/types/types/mapinitoptions.d.ts +4 -0
  383. package/dist/types/types/mapprovider.d.ts +46 -0
  384. package/dist/types/types/provideroptions.d.ts +8 -0
  385. package/dist/types/types/styleconfig.d.ts +27 -0
  386. package/dist/types/types/styling.d.ts +24 -0
  387. package/dist/types/types/styling.unit.d.ts +1 -0
  388. package/dist/types/types/vmaplayer.d.ts +10 -0
  389. package/dist/types/utils/async-mutex.d.ts +7 -0
  390. package/dist/types/utils/diff.d.ts +64 -0
  391. package/dist/types/utils/diff.unit.d.ts +1 -0
  392. package/dist/types/utils/dom-env.d.ts +5 -0
  393. package/dist/types/utils/dom-env.unit.d.ts +1 -0
  394. package/dist/types/utils/events.d.ts +29 -0
  395. package/dist/types/utils/logger.d.ts +47 -0
  396. package/dist/types/utils/logger.unit.d.ts +1 -0
  397. package/dist/types/utils/messages.d.ts +12 -0
  398. package/dist/types/utils/spatial-utils.d.ts +6 -0
  399. package/dist/types/utils/spatial-utils.unit.d.ts +1 -0
  400. package/dist/types/versions.d.ts +7 -0
  401. package/dist/v-map/index.esm.js +0 -0
  402. package/dist/v-map/p--vVleK-M.js +1 -0
  403. package/dist/v-map/p-09d10db0.entry.js +1 -0
  404. package/dist/v-map/p-5eba6058.entry.js +10 -0
  405. package/dist/v-map/p-6b102336.entry.js +1 -0
  406. package/dist/v-map/p-B-bAcABs.js +1 -0
  407. package/dist/v-map/p-BBpiaTpT.js +1 -0
  408. package/dist/v-map/p-BdijL4Av.js +1 -0
  409. package/dist/v-map/p-Be3r33VF.js +4 -0
  410. package/dist/v-map/p-BeFu0ap4.js +1 -0
  411. package/dist/v-map/p-BxFJezdK.js +1 -0
  412. package/dist/v-map/p-CMKJzsgL.js +1 -0
  413. package/dist/v-map/p-CXfA_q8m.js +1 -0
  414. package/dist/v-map/p-CZqY0yW4.js +1 -0
  415. package/dist/v-map/p-CafTHT9i.js +1 -0
  416. package/dist/v-map/p-DCTHyf58.js +1 -0
  417. package/dist/v-map/p-DQuL1Twl.js +1 -0
  418. package/dist/v-map/p-DR9McdNX.js +1 -0
  419. package/dist/v-map/p-Dckgonw8.js +1 -0
  420. package/dist/v-map/p-DhQAXuA7.js +15 -0
  421. package/dist/v-map/p-DmICdG34.js +7 -0
  422. package/dist/v-map/p-DrOQ9V4h.js +1 -0
  423. package/dist/v-map/p-DvHXtWUg.js +1 -0
  424. package/dist/v-map/p-E-ZsRS8r.js +1 -0
  425. package/dist/v-map/p-MyTSFnEk.js +1 -0
  426. package/dist/v-map/p-RpJarvr_.js +1 -0
  427. package/dist/v-map/p-WaMDUuAz.js +1 -0
  428. package/dist/v-map/p-aa410e64.entry.js +2 -0
  429. package/dist/v-map/p-c21c93fe.entry.js +1 -0
  430. package/dist/v-map/p-jzneDarq.js +2 -0
  431. package/dist/v-map/p-uiIP-taz.js +1 -0
  432. package/dist/v-map/v-map.esm.js +1 -0
  433. package/loader/cdn.js +1 -0
  434. package/loader/index.cjs.js +1 -0
  435. package/loader/index.d.ts +24 -0
  436. package/loader/index.es2017.js +1 -0
  437. package/loader/index.js +2 -0
  438. package/package.json +193 -0
@@ -0,0 +1,685 @@
1
+ import { C as ColumnLayer } from './polygon-layer-ByhxGhWC.js';
2
+ export { A as ArcLayer, P as PointCloudLayer, a as PolygonLayer } from './polygon-layer-ByhxGhWC.js';
3
+ import { G as Geometry, u as uid, L as Layer, p as project32, c as color, a as picking, U as UNIT, M as Model } from './deck-provider-C7U9VDEq.js';
4
+ export { B as BitmapLayer, e as GeoJsonLayer, I as IconLayer, P as PathLayer, b as ScatterplotLayer, f as SolidPolygonLayer, T as TextLayer, g as _MultiIconLayer, h as _TextBackgroundLayer } from './deck-provider-C7U9VDEq.js';
5
+ import './styleconfig-B-bAcABs.js';
6
+ import './index.browser-DhQAXuA7.js';
7
+ import './index-BUHa4Jj0.js';
8
+ import './_commonjsHelpers-E-ZsRS8r.js';
9
+ import './messages-CMKJzsgL.js';
10
+ import './geotiff-source-esnDnC-u.js';
11
+ import '@loaders.gl/core';
12
+ import '@loaders.gl/images';
13
+ import '@loaders.gl/loader-utils';
14
+ import '@loaders.gl/terrain';
15
+ import '@loaders.gl/schema';
16
+
17
+ // luma.gl
18
+ // SPDX-License-Identifier: MIT
19
+ // Copyright (c) vis.gl contributors
20
+ class CubeGeometry extends Geometry {
21
+ constructor(props = {}) {
22
+ const { id = uid('cube-geometry'), indices = true } = props;
23
+ super(indices
24
+ ? {
25
+ ...props,
26
+ id,
27
+ topology: 'triangle-list',
28
+ indices: { size: 1, value: CUBE_INDICES },
29
+ attributes: { ...ATTRIBUTES, ...props.attributes }
30
+ }
31
+ : {
32
+ ...props,
33
+ id,
34
+ topology: 'triangle-list',
35
+ indices: undefined,
36
+ attributes: { ...NON_INDEXED_ATTRIBUTES, ...props.attributes }
37
+ });
38
+ }
39
+ }
40
+ // prettier-ignore
41
+ const CUBE_INDICES = new Uint16Array([
42
+ 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13,
43
+ 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23
44
+ ]);
45
+ // prettier-ignore
46
+ const CUBE_POSITIONS = new Float32Array([
47
+ -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
48
+ -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,
49
+ -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,
50
+ -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,
51
+ 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,
52
+ -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1
53
+ ]);
54
+ // TODO - could be Uint8
55
+ // prettier-ignore
56
+ const CUBE_NORMALS = new Float32Array([
57
+ // Front face
58
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
59
+ // Back face
60
+ 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1,
61
+ // Top face
62
+ 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,
63
+ // Bottom face
64
+ 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0,
65
+ // Right face
66
+ 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,
67
+ // Left face
68
+ -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0
69
+ ]);
70
+ // prettier-ignore
71
+ const CUBE_TEX_COORDS = new Float32Array([
72
+ // Front face
73
+ 0, 0, 1, 0, 1, 1, 0, 1,
74
+ // Back face
75
+ 1, 0, 1, 1, 0, 1, 0, 0,
76
+ // Top face
77
+ 0, 1, 0, 0, 1, 0, 1, 1,
78
+ // Bottom face
79
+ 1, 1, 0, 1, 0, 0, 1, 0,
80
+ // Right face
81
+ 1, 0, 1, 1, 0, 1, 0, 0,
82
+ // Left face
83
+ 0, 0, 1, 0, 1, 1, 0, 1
84
+ ]);
85
+ // float4 position
86
+ // prettier-ignore
87
+ const CUBE_NON_INDEXED_POSITIONS = new Float32Array([
88
+ 1, -1, 1,
89
+ -1, -1, 1,
90
+ -1, -1, -1,
91
+ 1, -1, -1,
92
+ 1, -1, 1,
93
+ -1, -1, -1,
94
+ 1, 1, 1,
95
+ 1, -1, 1,
96
+ 1, -1, -1,
97
+ 1, 1, -1,
98
+ 1, 1, 1,
99
+ 1, -1, -1,
100
+ -1, 1, 1,
101
+ 1, 1, 1,
102
+ 1, 1, -1,
103
+ -1, 1, -1,
104
+ -1, 1, 1,
105
+ 1, 1, -1,
106
+ -1, -1, 1,
107
+ -1, 1, 1,
108
+ -1, 1, -1,
109
+ -1, -1, -1,
110
+ -1, -1, 1,
111
+ -1, 1, -1,
112
+ 1, 1, 1,
113
+ -1, 1, 1,
114
+ -1, -1, 1,
115
+ -1, -1, 1,
116
+ 1, -1, 1,
117
+ 1, 1, 1,
118
+ 1, -1, -1,
119
+ -1, -1, -1,
120
+ -1, 1, -1,
121
+ 1, 1, -1,
122
+ 1, -1, -1,
123
+ -1, 1, -1,
124
+ ]);
125
+ // float2 uv,
126
+ // prettier-ignore
127
+ const CUBE_NON_INDEXED_TEX_COORDS = new Float32Array([
128
+ 1, 1,
129
+ 0, 1,
130
+ 0, 0,
131
+ 1, 0,
132
+ 1, 1,
133
+ 0, 0,
134
+ 1, 1,
135
+ 0, 1,
136
+ 0, 0,
137
+ 1, 0,
138
+ 1, 1,
139
+ 0, 0,
140
+ 1, 1,
141
+ 0, 1,
142
+ 0, 0,
143
+ 1, 0,
144
+ 1, 1,
145
+ 0, 0,
146
+ 1, 1,
147
+ 0, 1,
148
+ 0, 0,
149
+ 1, 0,
150
+ 1, 1,
151
+ 0, 0,
152
+ 1, 1,
153
+ 0, 1,
154
+ 0, 0,
155
+ 0, 0,
156
+ 1, 0,
157
+ 1, 1,
158
+ 1, 1,
159
+ 0, 1,
160
+ 0, 0,
161
+ 1, 0,
162
+ 1, 1,
163
+ 0, 0,
164
+ ]);
165
+ // float4 color
166
+ // prettier-ignore
167
+ const CUBE_NON_INDEXED_COLORS = new Float32Array([
168
+ 1, 0, 1, 1,
169
+ 0, 0, 1, 1,
170
+ 0, 0, 0, 1,
171
+ 1, 0, 0, 1,
172
+ 1, 0, 1, 1,
173
+ 0, 0, 0, 1,
174
+ 1, 1, 1, 1,
175
+ 1, 0, 1, 1,
176
+ 1, 0, 0, 1,
177
+ 1, 1, 0, 1,
178
+ 1, 1, 1, 1,
179
+ 1, 0, 0, 1,
180
+ 0, 1, 1, 1,
181
+ 1, 1, 1, 1,
182
+ 1, 1, 0, 1,
183
+ 0, 1, 0, 1,
184
+ 0, 1, 1, 1,
185
+ 1, 1, 0, 1,
186
+ 0, 0, 1, 1,
187
+ 0, 1, 1, 1,
188
+ 0, 1, 0, 1,
189
+ 0, 0, 0, 1,
190
+ 0, 0, 1, 1,
191
+ 0, 1, 0, 1,
192
+ 1, 1, 1, 1,
193
+ 0, 1, 1, 1,
194
+ 0, 0, 1, 1,
195
+ 0, 0, 1, 1,
196
+ 1, 0, 1, 1,
197
+ 1, 1, 1, 1,
198
+ 1, 0, 0, 1,
199
+ 0, 0, 0, 1,
200
+ 0, 1, 0, 1,
201
+ 1, 1, 0, 1,
202
+ 1, 0, 0, 1,
203
+ 0, 1, 0, 1,
204
+ ]);
205
+ const ATTRIBUTES = {
206
+ POSITION: { size: 3, value: CUBE_POSITIONS },
207
+ NORMAL: { size: 3, value: CUBE_NORMALS },
208
+ TEXCOORD_0: { size: 2, value: CUBE_TEX_COORDS }
209
+ };
210
+ const NON_INDEXED_ATTRIBUTES = {
211
+ POSITION: { size: 3, value: CUBE_NON_INDEXED_POSITIONS },
212
+ // NORMAL: {size: 3, value: CUBE_NON_INDEXED_NORMALS},
213
+ TEXCOORD_0: { size: 2, value: CUBE_NON_INDEXED_TEX_COORDS },
214
+ COLOR_0: { size: 3, value: CUBE_NON_INDEXED_COLORS }
215
+ };
216
+
217
+ // deck.gl
218
+ // SPDX-License-Identifier: MIT
219
+ // Copyright (c) vis.gl contributors
220
+ const uniformBlockWGSL = /* wgsl */ `\
221
+ struct LineUniforms {
222
+ widthScale: f32,
223
+ widthMinPixels: f32,
224
+ widthMaxPixels: f32,
225
+ useShortestPath: f32,
226
+ widthUnits: i32,
227
+ };
228
+
229
+ @group(0) @binding(1)
230
+ var<uniform> line: LineUniforms;
231
+ `;
232
+ const uniformBlockGLSL = /* glsl */ `\
233
+ uniform lineUniforms {
234
+ float widthScale;
235
+ float widthMinPixels;
236
+ float widthMaxPixels;
237
+ float useShortestPath;
238
+ highp int widthUnits;
239
+ } line;
240
+ `;
241
+ const lineUniforms = {
242
+ name: 'line',
243
+ source: uniformBlockWGSL,
244
+ vs: uniformBlockGLSL,
245
+ fs: uniformBlockGLSL,
246
+ uniformTypes: {
247
+ widthScale: 'f32',
248
+ widthMinPixels: 'f32',
249
+ widthMaxPixels: 'f32',
250
+ useShortestPath: 'f32',
251
+ widthUnits: 'i32'
252
+ }
253
+ };
254
+
255
+ // deck.gl
256
+ // SPDX-License-Identifier: MIT
257
+ // Copyright (c) vis.gl contributors
258
+ const shaderWGSL = /* wgsl */ `\
259
+ // ---------- Helper Structures & Functions ----------
260
+
261
+ // Placeholder filter functions.
262
+ fn deckgl_filter_size(offset: vec3<f32>, geometry: Geometry) -> vec3<f32> {
263
+ return offset;
264
+ }
265
+ fn deckgl_filter_gl_position(p: vec4<f32>, geometry: Geometry) -> vec4<f32> {
266
+ return p;
267
+ }
268
+ fn deckgl_filter_color(color: vec4<f32>, geometry: Geometry) -> vec4<f32> {
269
+ return color;
270
+ }
271
+
272
+ // Compute an extrusion offset given a line direction (in clipspace),
273
+ // an offset direction (-1 or 1), and a width in pixels.
274
+ // Assumes a uniform "project" with a viewportSize field is available.
275
+ fn getExtrusionOffset(line_clipspace: vec2<f32>, offset_direction: f32, width: f32) -> vec2<f32> {
276
+ // project.viewportSize should be provided as a uniform (not shown here)
277
+ let dir_screenspace = normalize(line_clipspace * project.viewportSize);
278
+ // Rotate by 90°: (x,y) becomes (-y,x)
279
+ let rotated = vec2<f32>(-dir_screenspace.y, dir_screenspace.x);
280
+ return rotated * offset_direction * width / 2.0;
281
+ }
282
+
283
+ // Splits the line between two points at a given x coordinate.
284
+ // Interpolates the y and z components.
285
+ fn splitLine(a: vec3<f32>, b: vec3<f32>, x: f32) -> vec3<f32> {
286
+ let t: f32 = (x - a.x) / (b.x - a.x);
287
+ return vec3<f32>(x, a.yz + t * (b.yz - a.yz));
288
+ }
289
+
290
+ // ---------- Uniforms & Global Structures ----------
291
+
292
+ // Uniforms for line, color, and project are assumed to be defined elsewhere.
293
+ // For example:
294
+ //
295
+ // @group(0) @binding(0)
296
+ // var<uniform> line: LineUniform;
297
+ //
298
+ // struct ColorUniform {
299
+ // opacity: f32,
300
+ // };
301
+ // @group(0) @binding(1)
302
+ // var<uniform> color: ColorUniform;
303
+ //
304
+ // struct ProjectUniform {
305
+ // viewportSize: vec2<f32>,
306
+ // };
307
+ // @group(0) @binding(2)
308
+ // var<uniform> project: ProjectUniform;
309
+
310
+
311
+
312
+ // ---------- Vertex Output Structure ----------
313
+
314
+ struct Varyings {
315
+ @builtin(position) gl_Position: vec4<f32>,
316
+ @location(0) vColor: vec4<f32>,
317
+ @location(1) uv: vec2<f32>,
318
+ };
319
+
320
+ // ---------- Vertex Shader Entry Point ----------
321
+
322
+ @vertex
323
+ fn vertexMain(
324
+ @location(0) positions: vec3<f32>,
325
+ @location(1) instanceSourcePositions: vec3<f32>,
326
+ @location(2) instanceTargetPositions: vec3<f32>,
327
+ @location(3) instanceSourcePositions64Low: vec3<f32>,
328
+ @location(4) instanceTargetPositions64Low: vec3<f32>,
329
+ @location(5) instanceColors: vec4<f32>,
330
+ @location(6) instancePickingColors: vec3<f32>,
331
+ @location(7) instanceWidths: f32
332
+ ) -> Varyings {
333
+ var geometry: Geometry;
334
+ geometry.worldPosition = instanceSourcePositions;
335
+ geometry.worldPositionAlt = instanceTargetPositions;
336
+
337
+ var source_world: vec3<f32> = instanceSourcePositions;
338
+ var target_world: vec3<f32> = instanceTargetPositions;
339
+ var source_world_64low: vec3<f32> = instanceSourcePositions64Low;
340
+ var target_world_64low: vec3<f32> = instanceTargetPositions64Low;
341
+
342
+ // Apply shortest-path adjustments if needed.
343
+ if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
344
+ source_world.x = (source_world.x + 180.0 % 360.0) - 180.0;
345
+ target_world.x = (target_world.x + 180.0 % 360.0) - 180.0;
346
+ let deltaLng: f32 = target_world.x - source_world.x;
347
+
348
+ if (deltaLng * line.useShortestPath > 180.0) {
349
+ source_world.x = source_world.x + 360.0 * line.useShortestPath;
350
+ source_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
351
+ source_world_64low = vec3<f32>(0.0, 0.0, 0.0);
352
+ } else if (deltaLng * line.useShortestPath < -180.0) {
353
+ target_world.x = target_world.x + 360.0 * line.useShortestPath;
354
+ target_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
355
+ target_world_64low = vec3<f32>(0.0, 0.0, 0.0);
356
+ } else if (line.useShortestPath < 0.0) {
357
+ var abortOut: Varyings;
358
+ abortOut.gl_Position = vec4<f32>(0.0);
359
+ abortOut.vColor = vec4<f32>(0.0);
360
+ abortOut.uv = vec2<f32>(0.0);
361
+ return abortOut;
362
+ }
363
+ }
364
+
365
+ // Project Pos and target positions to clip space.
366
+ let sourceResult = project_position_to_clipspace_and_commonspace(source_world, source_world_64low, vec3<f32>(0.0));
367
+ let targetResult = project_position_to_clipspace_and_commonspace(target_world, target_world_64low, vec3<f32>(0.0));
368
+ let sourcePos: vec4<f32> = sourceResult.clipPosition;
369
+ let targetPos: vec4<f32> = targetResult.clipPosition;
370
+ let source_commonspace: vec4<f32> = sourceResult.commonPosition;
371
+ let target_commonspace: vec4<f32> = targetResult.commonPosition;
372
+
373
+ // Interpolate along the line segment.
374
+ let segmentIndex: f32 = positions.x;
375
+ let p: vec4<f32> = sourcePos + segmentIndex * (targetPos - sourcePos);
376
+ geometry.position = source_commonspace + segmentIndex * (target_commonspace - source_commonspace);
377
+ let uv: vec2<f32> = positions.xy;
378
+ geometry.uv = uv;
379
+ geometry.pickingColor = instancePickingColors;
380
+
381
+ // Determine width in pixels.
382
+ let widthPixels: f32 = clamp(
383
+ project_unit_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
384
+ line.widthMinPixels, line.widthMaxPixels
385
+ );
386
+
387
+ // Compute extrusion offset.
388
+ let extrusion: vec2<f32> = getExtrusionOffset(targetPos.xy - sourcePos.xy, positions.y, widthPixels);
389
+ let offset: vec3<f32> = vec3<f32>(extrusion, 0.0);
390
+
391
+ // Apply deck.gl filter functions.
392
+ let filteredOffset = deckgl_filter_size(offset, geometry);
393
+ let filteredP = deckgl_filter_gl_position(p, geometry);
394
+
395
+ let clipOffset: vec2<f32> = project_pixel_size_to_clipspace(filteredOffset.xy);
396
+ let finalPosition: vec4<f32> = filteredP + vec4<f32>(clipOffset, 0.0, 0.0);
397
+
398
+ // Compute color.
399
+ var vColor: vec4<f32> = vec4<f32>(instanceColors.rgb, instanceColors.a * color.opacity);
400
+ // vColor = deckgl_filter_color(vColor, geometry);
401
+
402
+ var output: Varyings;
403
+ output.gl_Position = finalPosition;
404
+ output.vColor = vColor;
405
+ output.uv = uv;
406
+ return output;
407
+ }
408
+
409
+ @fragment
410
+ fn fragmentMain(
411
+ @location(0) vColor: vec4<f32>,
412
+ @location(1) uv: vec2<f32>
413
+ ) -> @location(0) vec4<f32> {
414
+ // Create and initialize geometry with the provided uv.
415
+ var geometry: Geometry;
416
+ geometry.uv = uv;
417
+
418
+ // Start with the input color.
419
+ var fragColor: vec4<f32> = vColor;
420
+
421
+ // Apply the deck.gl filter to the color.
422
+ fragColor = deckgl_filter_color(fragColor, geometry);
423
+
424
+ // Apply premultiplied alpha as required by transparent canvas
425
+ fragColor = deckgl_premultiplied_alpha(fragColor);
426
+
427
+ return fragColor;
428
+ }
429
+ `;
430
+
431
+ // deck.gl
432
+ // SPDX-License-Identifier: MIT
433
+ // Copyright (c) vis.gl contributors
434
+ var vs = `\
435
+ #version 300 es
436
+ #define SHADER_NAME line-layer-vertex-shader
437
+ in vec3 positions;
438
+ in vec3 instanceSourcePositions;
439
+ in vec3 instanceTargetPositions;
440
+ in vec3 instanceSourcePositions64Low;
441
+ in vec3 instanceTargetPositions64Low;
442
+ in vec4 instanceColors;
443
+ in vec3 instancePickingColors;
444
+ in float instanceWidths;
445
+ out vec4 vColor;
446
+ out vec2 uv;
447
+ vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {
448
+ vec2 dir_screenspace = normalize(line_clipspace * project.viewportSize);
449
+ dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
450
+ return dir_screenspace * offset_direction * width / 2.0;
451
+ }
452
+ vec3 splitLine(vec3 a, vec3 b, float x) {
453
+ float t = (x - a.x) / (b.x - a.x);
454
+ return vec3(x, mix(a.yz, b.yz, t));
455
+ }
456
+ void main(void) {
457
+ geometry.worldPosition = instanceSourcePositions;
458
+ geometry.worldPositionAlt = instanceTargetPositions;
459
+ vec3 source_world = instanceSourcePositions;
460
+ vec3 target_world = instanceTargetPositions;
461
+ vec3 source_world_64low = instanceSourcePositions64Low;
462
+ vec3 target_world_64low = instanceTargetPositions64Low;
463
+ if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
464
+ source_world.x = mod(source_world.x + 180., 360.0) - 180.;
465
+ target_world.x = mod(target_world.x + 180., 360.0) - 180.;
466
+ float deltaLng = target_world.x - source_world.x;
467
+ if (deltaLng * line.useShortestPath > 180.) {
468
+ source_world.x += 360. * line.useShortestPath;
469
+ source_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
470
+ source_world_64low = vec3(0.0);
471
+ } else if (deltaLng * line.useShortestPath < -180.) {
472
+ target_world.x += 360. * line.useShortestPath;
473
+ target_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
474
+ target_world_64low = vec3(0.0);
475
+ } else if (line.useShortestPath < 0.) {
476
+ gl_Position = vec4(0.);
477
+ return;
478
+ }
479
+ }
480
+ vec4 source_commonspace;
481
+ vec4 target_commonspace;
482
+ vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);
483
+ vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);
484
+ float segmentIndex = positions.x;
485
+ vec4 p = mix(source, target, segmentIndex);
486
+ geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);
487
+ uv = positions.xy;
488
+ geometry.uv = uv;
489
+ geometry.pickingColor = instancePickingColors;
490
+ float widthPixels = clamp(
491
+ project_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
492
+ line.widthMinPixels, line.widthMaxPixels
493
+ );
494
+ vec3 offset = vec3(
495
+ getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),
496
+ 0.0);
497
+ DECKGL_FILTER_SIZE(offset, geometry);
498
+ DECKGL_FILTER_GL_POSITION(p, geometry);
499
+ gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);
500
+ vColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);
501
+ DECKGL_FILTER_COLOR(vColor, geometry);
502
+ }
503
+ `;
504
+
505
+ // deck.gl
506
+ // SPDX-License-Identifier: MIT
507
+ // Copyright (c) vis.gl contributors
508
+ var fs = `\
509
+ #version 300 es
510
+ #define SHADER_NAME line-layer-fragment-shader
511
+ precision highp float;
512
+ in vec4 vColor;
513
+ in vec2 uv;
514
+ out vec4 fragColor;
515
+ void main(void) {
516
+ geometry.uv = uv;
517
+ fragColor = vColor;
518
+ DECKGL_FILTER_COLOR(fragColor, geometry);
519
+ }
520
+ `;
521
+
522
+ // deck.gl
523
+ // SPDX-License-Identifier: MIT
524
+ // Copyright (c) vis.gl contributors
525
+ const DEFAULT_COLOR = [0, 0, 0, 255];
526
+ const defaultProps$1 = {
527
+ getSourcePosition: { type: 'accessor', value: (x) => x.sourcePosition },
528
+ getTargetPosition: { type: 'accessor', value: (x) => x.targetPosition },
529
+ getColor: { type: 'accessor', value: DEFAULT_COLOR },
530
+ getWidth: { type: 'accessor', value: 1 },
531
+ widthUnits: 'pixels',
532
+ widthScale: { type: 'number', value: 1, min: 0 },
533
+ widthMinPixels: { type: 'number', value: 0, min: 0 },
534
+ widthMaxPixels: { type: 'number', value: Number.MAX_SAFE_INTEGER, min: 0 }
535
+ };
536
+ /**
537
+ * A layer that renders straight lines joining pairs of source and target coordinates.
538
+ */
539
+ class LineLayer extends Layer {
540
+ getBounds() {
541
+ return this.getAttributeManager()?.getBounds([
542
+ 'instanceSourcePositions',
543
+ 'instanceTargetPositions'
544
+ ]);
545
+ }
546
+ getShaders() {
547
+ return super.getShaders({ vs, fs, source: shaderWGSL, modules: [project32, color, picking, lineUniforms] });
548
+ }
549
+ // This layer has its own wrapLongitude logic
550
+ get wrapLongitude() {
551
+ return false;
552
+ }
553
+ initializeState() {
554
+ const attributeManager = this.getAttributeManager();
555
+ /* eslint-disable max-len */
556
+ attributeManager.addInstanced({
557
+ instanceSourcePositions: {
558
+ size: 3,
559
+ type: 'float64',
560
+ fp64: this.use64bitPositions(),
561
+ transition: true,
562
+ accessor: 'getSourcePosition'
563
+ },
564
+ instanceTargetPositions: {
565
+ size: 3,
566
+ type: 'float64',
567
+ fp64: this.use64bitPositions(),
568
+ transition: true,
569
+ accessor: 'getTargetPosition'
570
+ },
571
+ instanceColors: {
572
+ size: this.props.colorFormat.length,
573
+ type: 'unorm8',
574
+ transition: true,
575
+ accessor: 'getColor',
576
+ defaultValue: [0, 0, 0, 255]
577
+ },
578
+ instanceWidths: {
579
+ size: 1,
580
+ transition: true,
581
+ accessor: 'getWidth',
582
+ defaultValue: 1
583
+ }
584
+ });
585
+ /* eslint-enable max-len */
586
+ }
587
+ updateState(params) {
588
+ super.updateState(params);
589
+ if (params.changeFlags.extensionsChanged) {
590
+ this.state.model?.destroy();
591
+ this.state.model = this._getModel();
592
+ this.getAttributeManager().invalidateAll();
593
+ }
594
+ }
595
+ draw({ uniforms }) {
596
+ const { widthUnits, widthScale, widthMinPixels, widthMaxPixels, wrapLongitude } = this.props;
597
+ const model = this.state.model;
598
+ const lineProps = {
599
+ widthUnits: UNIT[widthUnits],
600
+ widthScale,
601
+ widthMinPixels,
602
+ widthMaxPixels,
603
+ useShortestPath: wrapLongitude ? 1 : 0
604
+ };
605
+ model.shaderInputs.setProps({ line: lineProps });
606
+ model.draw(this.context.renderPass);
607
+ if (wrapLongitude) {
608
+ // Render a second copy for the clipped lines at the 180th meridian
609
+ model.shaderInputs.setProps({ line: { ...lineProps, useShortestPath: -1 } });
610
+ model.draw(this.context.renderPass);
611
+ }
612
+ }
613
+ _getModel() {
614
+ // TODO(ibgreen): WebGPU complication: Matching attachment state of the renderpass requires including a depth buffer
615
+ const parameters = this.context.device.type === 'webgpu'
616
+ ? {
617
+ depthWriteEnabled: true,
618
+ depthCompare: 'less-equal'
619
+ }
620
+ : undefined;
621
+ /*
622
+ * (0, -1)-------------_(1, -1)
623
+ * | _,-" |
624
+ * o _,-" o
625
+ * | _,-" |
626
+ * (0, 1)"-------------(1, 1)
627
+ */
628
+ const positions = [0, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0];
629
+ return new Model(this.context.device, {
630
+ ...this.getShaders(),
631
+ id: this.props.id,
632
+ bufferLayout: this.getAttributeManager().getBufferLayouts(),
633
+ geometry: new Geometry({
634
+ topology: 'triangle-strip',
635
+ attributes: {
636
+ positions: { size: 3, value: new Float32Array(positions) }
637
+ }
638
+ }),
639
+ parameters,
640
+ isInstanced: true
641
+ });
642
+ }
643
+ }
644
+ LineLayer.layerName = 'LineLayer';
645
+ LineLayer.defaultProps = defaultProps$1;
646
+
647
+ // deck.gl
648
+ // SPDX-License-Identifier: MIT
649
+ // Copyright (c) vis.gl contributors
650
+ const defaultProps = {
651
+ cellSize: { type: 'number', min: 0, value: 1000 },
652
+ offset: { type: 'array', value: [1, 1] }
653
+ };
654
+ class GridCellLayer extends ColumnLayer {
655
+ _updateGeometry() {
656
+ const geometry = new CubeGeometry();
657
+ this.state.fillModel.setGeometry(geometry);
658
+ }
659
+ draw({ uniforms }) {
660
+ const { elevationScale, extruded, offset, coverage, cellSize, angle, radiusUnits } = this.props;
661
+ const fillModel = this.state.fillModel;
662
+ const columnProps = {
663
+ radius: cellSize / 2,
664
+ radiusUnits: UNIT[radiusUnits],
665
+ angle,
666
+ offset,
667
+ extruded,
668
+ stroked: false,
669
+ coverage,
670
+ elevationScale,
671
+ edgeDistance: 1,
672
+ isStroke: false,
673
+ widthUnits: 0,
674
+ widthScale: 0,
675
+ widthMinPixels: 0,
676
+ widthMaxPixels: 0
677
+ };
678
+ fillModel.shaderInputs.setProps({ column: columnProps });
679
+ fillModel.draw(this.context.renderPass);
680
+ }
681
+ }
682
+ GridCellLayer.layerName = 'GridCellLayer';
683
+ GridCellLayer.defaultProps = defaultProps;
684
+
685
+ export { ColumnLayer, GridCellLayer, LineLayer };