@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.
- package/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/cjs/_commonjsHelpers-B83fTs8d.js +36 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/cesium-provider-BiFFyAl9.js +2598 -0
- package/dist/cjs/deck-provider-Ctq3Q8a1.js +47824 -0
- package/dist/cjs/geotiff-CEwvF9cG.js +47 -0
- package/dist/cjs/geotiff-source-RaNzzWkC.js +1522 -0
- package/dist/cjs/index-B1oGO1g-.js +10658 -0
- package/dist/cjs/index-B8LHqjyg.js +1765 -0
- package/dist/cjs/index-BIL4VsgP.js +310 -0
- package/dist/cjs/index-Blku2QY8.js +167 -0
- package/dist/cjs/index-CJvvX4yx.js +21 -0
- package/dist/cjs/index-CbVT-Con.js +699 -0
- package/dist/cjs/index-ISOEpMC3.js +20478 -0
- package/dist/cjs/index-JSwBbvGA.js +1621 -0
- package/dist/cjs/index.browser-DQhD8Jwl.js +6873 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/layer-extension-B_olS0rc.js +65 -0
- package/dist/cjs/leaflet-provider-DOqfs7g5.js +1815 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/main-dist-7TykwFci.js +2655 -0
- package/dist/cjs/messages-D7h4m8Tx.js +186 -0
- package/dist/cjs/openlayers-provider-Dfeg6L4n.js +1604 -0
- package/dist/cjs/polygon-layer-B9PrN7vr.js +1300 -0
- package/dist/cjs/scenegraph-layer-DwNoxQdi.js +2530 -0
- package/dist/cjs/styleconfig-CVRqArk-.js +23 -0
- package/dist/cjs/v-map-builder.cjs.entry.js +3786 -0
- package/dist/cjs/v-map-layer-geojson_12.cjs.entry.js +40894 -0
- package/dist/cjs/v-map-layer-helper-iAzxAg9I.js +285 -0
- package/dist/cjs/v-map-layer-terrain-geotiff.cjs.entry.js +258 -0
- package/dist/cjs/v-map-layercontrol.cjs.entry.js +247 -0
- package/dist/cjs/v-map.cjs.js +25 -0
- package/dist/cjs/v-map.v-map-layer-osm.v-map-layergroup-BsXp3BoL.js +582 -0
- package/dist/cjs/v-map_3.cjs.entry.js +12 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/v-map/v-map.css +3 -0
- package/dist/collection/components/v-map/v-map.js +467 -0
- package/dist/collection/components/v-map/v-map.test.js +33 -0
- package/dist/collection/components/v-map-builder/v-map-builder.css +1 -0
- package/dist/collection/components/v-map-builder/v-map-builder.js +913 -0
- package/dist/collection/components/v-map-builder/v-map-builder.test.js +56 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.js +862 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.test.js +42 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.css +4 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.js +500 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.test.js +38 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.css +1 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.js +442 -0
- package/dist/collection/components/v-map-layer-osm/error-api.test.js +108 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.css +4 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.js +311 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.test.js +36 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.css +1 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.js +305 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.css +3 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.js +548 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.test.js +36 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.css +3 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js +735 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.js +42 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.css +3 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.js +449 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.test.js +50 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.css +1 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.js +448 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.test.js +39 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.css +1 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.js +489 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.test.js +43 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.css +1 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.js +811 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.test.js +34 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.css +1 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.js +453 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.test.js +36 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.css +1 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.js +331 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.test.js +28 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.css +74 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.js +277 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.test.js +134 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.css +4 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.js +212 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.test.js +39 -0
- package/dist/collection/components/v-map-style/v-map-style.css +38 -0
- package/dist/collection/components/v-map-style/v-map-style.js +492 -0
- package/dist/collection/components/v-map-style/v-map-style.unit.js +62 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/layer/v-map-layer-helper.js +281 -0
- package/dist/collection/layer/v-map-layer-helper.unit.js +234 -0
- package/dist/collection/lib/cesium-loader.js +58 -0
- package/dist/collection/lib/ensure-importmap.js +12 -0
- package/dist/collection/lib/ensure-importmap.unit.js +57 -0
- package/dist/collection/lib/versions.gen.js +6 -0
- package/dist/collection/lib/vstyle.js +8 -0
- package/dist/collection/map-provider/cesium/CesiumGeoTIFFTerrainProvider.js +285 -0
- package/dist/collection/map-provider/cesium/CesiumLayerGroups.js +159 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.js +192 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.test.js +57 -0
- package/dist/collection/map-provider/cesium/cesium-provider.js +1408 -0
- package/dist/collection/map-provider/cesium/i-layer.js +1 -0
- package/dist/collection/map-provider/cesium/layer-manager.js +467 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFLayer.js +483 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFTerrainLayer.js +410 -0
- package/dist/collection/map-provider/deck/LayerGroupWithModel.js +169 -0
- package/dist/collection/map-provider/deck/LayerGroups.js +192 -0
- package/dist/collection/map-provider/deck/LayerModel.js +1 -0
- package/dist/collection/map-provider/deck/RenderableGroup.js +1 -0
- package/dist/collection/map-provider/deck/deck-provider.js +1563 -0
- package/dist/collection/map-provider/geotiff/geotiff-source.js +172 -0
- package/dist/collection/map-provider/geotiff/utils/AABB2D.js +24 -0
- package/dist/collection/map-provider/geotiff/utils/BVHNode2D.js +166 -0
- package/dist/collection/map-provider/geotiff/utils/GeoTIFFTileProcessor.js +484 -0
- package/dist/collection/map-provider/geotiff/utils/Triangle.js +1 -0
- package/dist/collection/map-provider/geotiff/utils/Triangulation.js +321 -0
- package/dist/collection/map-provider/geotiff/utils/colormap-utils.js +190 -0
- package/dist/collection/map-provider/geotiff/utils/normalization-utils.js +122 -0
- package/dist/collection/map-provider/geotiff/utils/sampling-utils.js +108 -0
- package/dist/collection/map-provider/leaflet/GeoTIFFGridLayer.js +147 -0
- package/dist/collection/map-provider/leaflet/WCSGridLayer.js +124 -0
- package/dist/collection/map-provider/leaflet/google-map-tiles-layer.js +352 -0
- package/dist/collection/map-provider/leaflet/leaflet-helpers.js +94 -0
- package/dist/collection/map-provider/leaflet/leaflet-provider.js +1095 -0
- package/dist/collection/map-provider/ol/CustomGeoTiff.js +145 -0
- package/dist/collection/map-provider/ol/openlayers-helper.js +26 -0
- package/dist/collection/map-provider/ol/openlayers-provider.js +1427 -0
- package/dist/collection/map-provider/provider-factory.js +44 -0
- package/dist/collection/map-provider/provider-factory.unit.js +66 -0
- package/dist/collection/testing/browser-test-utils.js +49 -0
- package/dist/collection/testing/e2e-testing.js +122 -0
- package/dist/collection/testing/e2e-utils.js +70 -0
- package/dist/collection/testing/geotiff-test-server.js +100 -0
- package/dist/collection/testing/mocks/geostyler-lyrx-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-mapbox-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-qgis-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-sld-parser.js +13 -0
- package/dist/collection/testing/mocks/geostyler-style.js +5 -0
- package/dist/collection/testing/setupTests.browser.js +1 -0
- package/dist/collection/testing/setupTests.stencil.js +20 -0
- package/dist/collection/testing/setupTests.vitest.js +59 -0
- package/dist/collection/testing/stencil-testing-wrapper.js +43 -0
- package/dist/collection/testing/styleMock.js +1 -0
- package/dist/collection/types/color.js +1 -0
- package/dist/collection/types/cssmode.js +1 -0
- package/dist/collection/types/flavour.js +1 -0
- package/dist/collection/types/layerconfig.js +1 -0
- package/dist/collection/types/lonlat.js +1 -0
- package/dist/collection/types/mapinitoptions.js +1 -0
- package/dist/collection/types/mapprovider.js +1 -0
- package/dist/collection/types/provideroptions.js +1 -0
- package/dist/collection/types/styleconfig.js +19 -0
- package/dist/collection/types/styling.js +13 -0
- package/dist/collection/types/styling.unit.js +37 -0
- package/dist/collection/types/vmaplayer.js +1 -0
- package/dist/collection/utils/async-mutex.js +28 -0
- package/dist/collection/utils/diff.js +142 -0
- package/dist/collection/utils/diff.unit.js +59 -0
- package/dist/collection/utils/dom-env.js +43 -0
- package/dist/collection/utils/dom-env.unit.js +92 -0
- package/dist/collection/utils/events.js +8 -0
- package/dist/collection/utils/logger.js +183 -0
- package/dist/collection/utils/logger.unit.js +98 -0
- package/dist/collection/utils/messages.js +12 -0
- package/dist/collection/utils/spatial-utils.js +27 -0
- package/dist/collection/utils/spatial-utils.unit.js +24 -0
- package/dist/components/_commonjsHelpers.js +1 -0
- package/dist/components/cesium-provider.js +1 -0
- package/dist/components/deck-provider.js +1 -0
- package/dist/components/events.js +1 -0
- package/dist/components/geotiff-source.js +1 -0
- package/dist/components/geotiff.js +4 -0
- package/dist/components/index.browser.js +15 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/index3.js +1 -0
- package/dist/components/index4.js +1 -0
- package/dist/components/index5.js +1 -0
- package/dist/components/index6.js +1 -0
- package/dist/components/index7.js +1 -0
- package/dist/components/index8.js +7 -0
- package/dist/components/layer-extension.js +1 -0
- package/dist/components/leaflet-provider.js +1 -0
- package/dist/components/main-dist.js +1 -0
- package/dist/components/messages.js +1 -0
- package/dist/components/openlayers-provider.js +1 -0
- package/dist/components/polygon-layer.js +1 -0
- package/dist/components/scenegraph-layer.js +1 -0
- package/dist/components/styleconfig.js +1 -0
- package/dist/components/styling.js +1 -0
- package/dist/components/v-map-builder.d.ts +11 -0
- package/dist/components/v-map-builder.js +2 -0
- package/dist/components/v-map-layer-geojson.d.ts +11 -0
- package/dist/components/v-map-layer-geojson.js +1 -0
- package/dist/components/v-map-layer-geojson2.js +1 -0
- package/dist/components/v-map-layer-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-geotiff.js +1 -0
- package/dist/components/v-map-layer-geotiff2.js +1 -0
- package/dist/components/v-map-layer-google.d.ts +11 -0
- package/dist/components/v-map-layer-google.js +1 -0
- package/dist/components/v-map-layer-google2.js +1 -0
- package/dist/components/v-map-layer-helper.js +1 -0
- package/dist/components/v-map-layer-osm.d.ts +11 -0
- package/dist/components/v-map-layer-osm.js +1 -0
- package/dist/components/v-map-layer-osm2.js +1 -0
- package/dist/components/v-map-layer-scatterplot.d.ts +11 -0
- package/dist/components/v-map-layer-scatterplot.js +1 -0
- package/dist/components/v-map-layer-scatterplot2.js +1 -0
- package/dist/components/v-map-layer-terrain-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-terrain-geotiff.js +1 -0
- package/dist/components/v-map-layer-terrain.d.ts +11 -0
- package/dist/components/v-map-layer-terrain.js +1 -0
- package/dist/components/v-map-layer-terrain2.js +1 -0
- package/dist/components/v-map-layer-tile3d.d.ts +11 -0
- package/dist/components/v-map-layer-tile3d.js +1 -0
- package/dist/components/v-map-layer-tile3d2.js +1 -0
- package/dist/components/v-map-layer-wcs.d.ts +11 -0
- package/dist/components/v-map-layer-wcs.js +1 -0
- package/dist/components/v-map-layer-wcs2.js +1 -0
- package/dist/components/v-map-layer-wfs.d.ts +11 -0
- package/dist/components/v-map-layer-wfs.js +1 -0
- package/dist/components/v-map-layer-wfs2.js +1 -0
- package/dist/components/v-map-layer-wkt.d.ts +11 -0
- package/dist/components/v-map-layer-wkt.js +1 -0
- package/dist/components/v-map-layer-wkt2.js +1 -0
- package/dist/components/v-map-layer-wms.d.ts +11 -0
- package/dist/components/v-map-layer-wms.js +1 -0
- package/dist/components/v-map-layer-wms2.js +1 -0
- package/dist/components/v-map-layer-xyz.d.ts +11 -0
- package/dist/components/v-map-layer-xyz.js +1 -0
- package/dist/components/v-map-layer-xyz2.js +1 -0
- package/dist/components/v-map-layercontrol.d.ts +11 -0
- package/dist/components/v-map-layercontrol.js +1 -0
- package/dist/components/v-map-layergroup.d.ts +11 -0
- package/dist/components/v-map-layergroup.js +1 -0
- package/dist/components/v-map-layergroup2.js +1 -0
- package/dist/components/v-map-style.d.ts +11 -0
- package/dist/components/v-map-style.js +1 -0
- package/dist/components/v-map-style2.js +10 -0
- package/dist/components/v-map.d.ts +11 -0
- package/dist/components/v-map.js +1 -0
- package/dist/components/v-map2.js +1 -0
- package/dist/esm/_commonjsHelpers-E-ZsRS8r.js +32 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/cesium-provider-BJfAup3w.js +2596 -0
- package/dist/esm/deck-provider-C7U9VDEq.js +47709 -0
- package/dist/esm/geotiff-BEWxTIfH.js +45 -0
- package/dist/esm/geotiff-source-esnDnC-u.js +1516 -0
- package/dist/esm/index-B1zwA4IC.js +685 -0
- package/dist/esm/index-BBpiaTpT.js +165 -0
- package/dist/esm/index-BIEmlzCf.js +1697 -0
- package/dist/esm/index-BUHa4Jj0.js +307 -0
- package/dist/esm/index-DbSdn93t.js +20461 -0
- package/dist/esm/index-RpJarvr_.js +10656 -0
- package/dist/esm/index-jN06TXUp.js +14 -0
- package/dist/esm/index-jzneDarq.js +1613 -0
- package/dist/esm/index.browser-DhQAXuA7.js +6860 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/layer-extension-CZXK5goK.js +63 -0
- package/dist/esm/leaflet-provider-Q41TB6ku.js +1794 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/main-dist-CwnA7_Xn.js +2652 -0
- package/dist/esm/messages-CMKJzsgL.js +180 -0
- package/dist/esm/openlayers-provider-CMsDsQTQ.js +1602 -0
- package/dist/esm/polygon-layer-ByhxGhWC.js +1295 -0
- package/dist/esm/scenegraph-layer-09K_B6DT.js +2526 -0
- package/dist/esm/styleconfig-B-bAcABs.js +21 -0
- package/dist/esm/v-map-builder.entry.js +3784 -0
- package/dist/esm/v-map-layer-geojson_12.entry.js +40881 -0
- package/dist/esm/v-map-layer-helper-Dys44Cgo.js +283 -0
- package/dist/esm/v-map-layer-terrain-geotiff.entry.js +256 -0
- package/dist/esm/v-map-layercontrol.entry.js +245 -0
- package/dist/esm/v-map.js +21 -0
- package/dist/esm/v-map.v-map-layer-osm.v-map-layergroup-B4pFHuSf.js +572 -0
- package/dist/esm/v-map_3.entry.js +4 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/cesium-augment.d.ts +5 -0
- package/dist/types/components/v-map/v-map.d.ts +70 -0
- package/dist/types/components/v-map/v-map.test.d.ts +1 -0
- package/dist/types/components/v-map-builder/v-map-builder.d.ts +48 -0
- package/dist/types/components/v-map-builder/v-map-builder.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.d.ts +129 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.d.ts +74 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-google/v-map-layer-google.d.ts +78 -0
- package/dist/types/components/v-map-layer-osm/error-api.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.d.ts +50 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-scatterplot/v-map-layer-scatterplot.d.ts +54 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.d.ts +74 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.d.ts +117 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.d.ts +69 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.d.ts +47 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.d.ts +59 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.d.ts +132 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.d.ts +76 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.d.ts +59 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.test.d.ts +1 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.d.ts +44 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.test.d.ts +1 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.d.ts +31 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.test.d.ts +1 -0
- package/dist/types/components/v-map-style/v-map-style.d.ts +75 -0
- package/dist/types/components/v-map-style/v-map-style.unit.d.ts +1 -0
- package/dist/types/components.d.ts +2391 -0
- package/dist/types/globals.d.ts +16 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/layer/v-map-layer-helper.d.ts +45 -0
- package/dist/types/layer/v-map-layer-helper.unit.d.ts +1 -0
- package/dist/types/leaflet-augment.d.ts +15 -0
- package/dist/types/lib/cesium-loader.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.unit.d.ts +1 -0
- package/dist/types/lib/versions.gen.d.ts +5 -0
- package/dist/types/lib/vstyle.d.ts +44 -0
- package/dist/types/map-provider/cesium/CesiumGeoTIFFTerrainProvider.d.ts +92 -0
- package/dist/types/map-provider/cesium/CesiumLayerGroups.d.ts +64 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.d.ts +75 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.test.d.ts +1 -0
- package/dist/types/map-provider/cesium/cesium-provider.d.ts +87 -0
- package/dist/types/map-provider/cesium/i-layer.d.ts +11 -0
- package/dist/types/map-provider/cesium/layer-manager.d.ts +31 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFLayer.d.ts +91 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFTerrainLayer.d.ts +82 -0
- package/dist/types/map-provider/deck/LayerGroupWithModel.d.ts +55 -0
- package/dist/types/map-provider/deck/LayerGroups.d.ts +63 -0
- package/dist/types/map-provider/deck/LayerModel.d.ts +8 -0
- package/dist/types/map-provider/deck/RenderableGroup.d.ts +20 -0
- package/dist/types/map-provider/deck/deck-provider.d.ts +92 -0
- package/dist/types/map-provider/geotiff/geotiff-source.d.ts +30 -0
- package/dist/types/map-provider/geotiff/utils/AABB2D.d.ts +28 -0
- package/dist/types/map-provider/geotiff/utils/BVHNode2D.d.ts +36 -0
- package/dist/types/map-provider/geotiff/utils/GeoTIFFTileProcessor.d.ts +116 -0
- package/dist/types/map-provider/geotiff/utils/Triangle.d.ts +5 -0
- package/dist/types/map-provider/geotiff/utils/Triangulation.d.ts +94 -0
- package/dist/types/map-provider/geotiff/utils/colormap-utils.d.ts +47 -0
- package/dist/types/map-provider/geotiff/utils/normalization-utils.d.ts +39 -0
- package/dist/types/map-provider/geotiff/utils/sampling-utils.d.ts +13 -0
- package/dist/types/map-provider/leaflet/GeoTIFFGridLayer.d.ts +34 -0
- package/dist/types/map-provider/leaflet/WCSGridLayer.d.ts +38 -0
- package/dist/types/map-provider/leaflet/google-map-tiles-layer.d.ts +73 -0
- package/dist/types/map-provider/leaflet/leaflet-helpers.d.ts +6 -0
- package/dist/types/map-provider/leaflet/leaflet-provider.d.ts +73 -0
- package/dist/types/map-provider/ol/CustomGeoTiff.d.ts +14 -0
- package/dist/types/map-provider/ol/openlayers-helper.d.ts +2 -0
- package/dist/types/map-provider/ol/openlayers-provider.d.ts +80 -0
- package/dist/types/map-provider/provider-factory.d.ts +12 -0
- package/dist/types/map-provider/provider-factory.unit.d.ts +1 -0
- package/dist/types/namespaces.d.ts +3 -0
- package/dist/types/ol-augment.d.ts +3 -0
- package/dist/types/ol-override.d.ts +7 -0
- package/dist/types/ol.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/testing/browser-test-utils.d.ts +6 -0
- package/dist/types/testing/e2e-testing.d.ts +5 -0
- package/dist/types/testing/e2e-utils.d.ts +4 -0
- package/dist/types/testing/geotiff-test-server.d.ts +5 -0
- package/dist/types/testing/mocks/geostyler-lyrx-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-mapbox-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-qgis-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-sld-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-style.d.ts +5 -0
- package/dist/types/testing/setupTests.browser.d.ts +1 -0
- package/dist/types/testing/setupTests.stencil.d.ts +1 -0
- package/dist/types/testing/setupTests.vitest.d.ts +1 -0
- package/dist/types/testing/stencil-testing-wrapper.d.ts +3 -0
- package/dist/types/types/color.d.ts +1 -0
- package/dist/types/types/cssmode.d.ts +1 -0
- package/dist/types/types/flavour.d.ts +1 -0
- package/dist/types/types/layerconfig.d.ts +207 -0
- package/dist/types/types/lonlat.d.ts +1 -0
- package/dist/types/types/mapinitoptions.d.ts +4 -0
- package/dist/types/types/mapprovider.d.ts +46 -0
- package/dist/types/types/provideroptions.d.ts +8 -0
- package/dist/types/types/styleconfig.d.ts +27 -0
- package/dist/types/types/styling.d.ts +24 -0
- package/dist/types/types/styling.unit.d.ts +1 -0
- package/dist/types/types/vmaplayer.d.ts +10 -0
- package/dist/types/utils/async-mutex.d.ts +7 -0
- package/dist/types/utils/diff.d.ts +64 -0
- package/dist/types/utils/diff.unit.d.ts +1 -0
- package/dist/types/utils/dom-env.d.ts +5 -0
- package/dist/types/utils/dom-env.unit.d.ts +1 -0
- package/dist/types/utils/events.d.ts +29 -0
- package/dist/types/utils/logger.d.ts +47 -0
- package/dist/types/utils/logger.unit.d.ts +1 -0
- package/dist/types/utils/messages.d.ts +12 -0
- package/dist/types/utils/spatial-utils.d.ts +6 -0
- package/dist/types/utils/spatial-utils.unit.d.ts +1 -0
- package/dist/types/versions.d.ts +7 -0
- package/dist/v-map/index.esm.js +0 -0
- package/dist/v-map/p--vVleK-M.js +1 -0
- package/dist/v-map/p-09d10db0.entry.js +1 -0
- package/dist/v-map/p-5eba6058.entry.js +10 -0
- package/dist/v-map/p-6b102336.entry.js +1 -0
- package/dist/v-map/p-B-bAcABs.js +1 -0
- package/dist/v-map/p-BBpiaTpT.js +1 -0
- package/dist/v-map/p-BdijL4Av.js +1 -0
- package/dist/v-map/p-Be3r33VF.js +4 -0
- package/dist/v-map/p-BeFu0ap4.js +1 -0
- package/dist/v-map/p-BxFJezdK.js +1 -0
- package/dist/v-map/p-CMKJzsgL.js +1 -0
- package/dist/v-map/p-CXfA_q8m.js +1 -0
- package/dist/v-map/p-CZqY0yW4.js +1 -0
- package/dist/v-map/p-CafTHT9i.js +1 -0
- package/dist/v-map/p-DCTHyf58.js +1 -0
- package/dist/v-map/p-DQuL1Twl.js +1 -0
- package/dist/v-map/p-DR9McdNX.js +1 -0
- package/dist/v-map/p-Dckgonw8.js +1 -0
- package/dist/v-map/p-DhQAXuA7.js +15 -0
- package/dist/v-map/p-DmICdG34.js +7 -0
- package/dist/v-map/p-DrOQ9V4h.js +1 -0
- package/dist/v-map/p-DvHXtWUg.js +1 -0
- package/dist/v-map/p-E-ZsRS8r.js +1 -0
- package/dist/v-map/p-MyTSFnEk.js +1 -0
- package/dist/v-map/p-RpJarvr_.js +1 -0
- package/dist/v-map/p-WaMDUuAz.js +1 -0
- package/dist/v-map/p-aa410e64.entry.js +2 -0
- package/dist/v-map/p-c21c93fe.entry.js +1 -0
- package/dist/v-map/p-jzneDarq.js +2 -0
- package/dist/v-map/p-uiIP-taz.js +1 -0
- package/dist/v-map/v-map.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- 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 };
|