@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,467 @@
|
|
|
1
|
+
// src/components/v-map/v-map.tsx
|
|
2
|
+
import { h, } from "@stencil/core";
|
|
3
|
+
import { createProvider } from "../../map-provider/provider-factory";
|
|
4
|
+
import { ensureImportMap } from "../../lib/ensure-importmap";
|
|
5
|
+
import { VMapEvents } from "../../utils/events";
|
|
6
|
+
import { watchElementResize } from "../../utils/dom-env";
|
|
7
|
+
import { log } from "../../utils/logger";
|
|
8
|
+
import MSG from "../../utils/messages";
|
|
9
|
+
const NOOP_PROVIDER = {
|
|
10
|
+
async init() { },
|
|
11
|
+
async destroy() { },
|
|
12
|
+
async setOpacity() { },
|
|
13
|
+
async setVisible() { },
|
|
14
|
+
async setZIndex() { },
|
|
15
|
+
async addLayerToGroup() {
|
|
16
|
+
return null;
|
|
17
|
+
},
|
|
18
|
+
async updateLayer() { },
|
|
19
|
+
async removeLayer() { },
|
|
20
|
+
async setView() { },
|
|
21
|
+
async addBaseLayer() {
|
|
22
|
+
return null;
|
|
23
|
+
},
|
|
24
|
+
async setBaseLayer() { },
|
|
25
|
+
async ensureGroup() { },
|
|
26
|
+
async setGroupVisible() { },
|
|
27
|
+
};
|
|
28
|
+
const MSG_COMPONENT = 'v-map - ';
|
|
29
|
+
export class VMap {
|
|
30
|
+
el;
|
|
31
|
+
/**
|
|
32
|
+
* Zu verwendender Karten-Provider.
|
|
33
|
+
* Unterstützte Werte: "ol" | "leaflet" | "cesium" | "deck".
|
|
34
|
+
* @default "ol"
|
|
35
|
+
* @example
|
|
36
|
+
* <v-map flavour="leaflet"></v-map>
|
|
37
|
+
*/
|
|
38
|
+
flavour = 'ol';
|
|
39
|
+
/**
|
|
40
|
+
* Mittelpunkt der Karte im **WGS84**-Koordinatensystem.
|
|
41
|
+
* Erwartet [lon, lat] (Längengrad, Breitengrad).
|
|
42
|
+
* @default [0, 0]
|
|
43
|
+
* @example
|
|
44
|
+
* <v-map center="[11.5761, 48.1371]" zoom="12"></v-map>
|
|
45
|
+
*/
|
|
46
|
+
center = '0,0';
|
|
47
|
+
/**
|
|
48
|
+
* Anfangs-Zoomstufe. Skala abhängig vom Provider (typisch 0–20).
|
|
49
|
+
* @default 3
|
|
50
|
+
*/
|
|
51
|
+
zoom = 2;
|
|
52
|
+
/** Falls true, injiziert v-map automatisch die Import-Map. */
|
|
53
|
+
useDefaultImportMap = true;
|
|
54
|
+
/**
|
|
55
|
+
* Aktiviert ein „CSS-Only“-Rendering (z. B. für einfache Tests/Layouts).
|
|
56
|
+
* Bei `true` werden keine Provider initialisiert.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
cssMode = 'cdn';
|
|
60
|
+
/**
|
|
61
|
+
* Wird ausgelöst, sobald der Karten-Provider initialisiert wurde und Layers entgegennimmt.
|
|
62
|
+
* `detail` enthält `{ provider, flavour }`.
|
|
63
|
+
* @event mapProviderReady
|
|
64
|
+
*/
|
|
65
|
+
mapProviderReady;
|
|
66
|
+
// KEIN @State – keine Re-Renders nötig
|
|
67
|
+
mapProvider;
|
|
68
|
+
mapState = 'unavailable';
|
|
69
|
+
mapContainer;
|
|
70
|
+
unsubscribeResize;
|
|
71
|
+
unsubscribePointerMove = null;
|
|
72
|
+
async onFlavourChanged(oldValue, newValue) {
|
|
73
|
+
log(MSG_COMPONENT + 'onFlavourChanged');
|
|
74
|
+
if (oldValue !== newValue) {
|
|
75
|
+
this.reset();
|
|
76
|
+
// await this.createMap();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
reset() {
|
|
80
|
+
this.unsubscribeResize?.();
|
|
81
|
+
this.unsubscribePointerMove?.();
|
|
82
|
+
this.unsubscribePointerMove = null;
|
|
83
|
+
const mapProvider = this.mapProvider;
|
|
84
|
+
this.mapProvider = null;
|
|
85
|
+
this.el.__vMapProvider = null;
|
|
86
|
+
const payLoad = {
|
|
87
|
+
mapProvider: NOOP_PROVIDER,
|
|
88
|
+
};
|
|
89
|
+
// this.mapProviderReady.emit(payLoad);
|
|
90
|
+
this.el.dispatchEvent(new CustomEvent(VMapEvents.MapProviderWillShutdown, {
|
|
91
|
+
detail: payLoad, // deine Payload
|
|
92
|
+
bubbles: false, // blubbert nach oben
|
|
93
|
+
composed: false, // geht über Shadow-Grenzen
|
|
94
|
+
cancelable: true, // Parent kann preventDefault() aufrufen
|
|
95
|
+
}));
|
|
96
|
+
mapProvider?.destroy();
|
|
97
|
+
this.mapState = 'unavailable';
|
|
98
|
+
}
|
|
99
|
+
async createMap() {
|
|
100
|
+
this.mapContainer = this.ensureContainer();
|
|
101
|
+
if (this.mapState === 'creating') {
|
|
102
|
+
log('Map already in creating state.');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.mapState = 'creating';
|
|
106
|
+
this.mapProvider = await createProvider(this.flavour);
|
|
107
|
+
const mapInitOpts = { zoom: this.zoom };
|
|
108
|
+
if (this.center) {
|
|
109
|
+
const centerLL = this.center.split(',').map(parseFloat);
|
|
110
|
+
const [centerLon, centerLat] = centerLL;
|
|
111
|
+
if (!Number.isFinite(centerLon) || !Number.isFinite(centerLat)) {
|
|
112
|
+
throw new Error(`<v-map>: Ungültiges center-Prop: "${this.center}" (erwartet "lon,lat")`);
|
|
113
|
+
}
|
|
114
|
+
mapInitOpts.center = centerLL;
|
|
115
|
+
}
|
|
116
|
+
const opts = {
|
|
117
|
+
target: this.mapContainer,
|
|
118
|
+
shadowRoot: this.el.shadowRoot,
|
|
119
|
+
mapInitOptions: mapInitOpts,
|
|
120
|
+
cssMode: this.cssMode,
|
|
121
|
+
};
|
|
122
|
+
await this.mapProvider.init(opts);
|
|
123
|
+
this.mapState = 'available';
|
|
124
|
+
this.el.__vMapProvider = this.mapProvider;
|
|
125
|
+
this.unsubscribeResize = watchElementResize(this.el, async () => {
|
|
126
|
+
await this.mapProvider?.setView(mapInitOpts.center, mapInitOpts.zoom);
|
|
127
|
+
});
|
|
128
|
+
const payLoad = {
|
|
129
|
+
mapProvider: this.mapProvider,
|
|
130
|
+
};
|
|
131
|
+
// this.mapProviderReady.emit(payLoad);
|
|
132
|
+
this.el.dispatchEvent(new CustomEvent(VMapEvents.MapProviderReady, {
|
|
133
|
+
detail: payLoad, // deine Payload
|
|
134
|
+
bubbles: false, // blubbert nach oben
|
|
135
|
+
composed: false, // geht über Shadow-Grenzen
|
|
136
|
+
cancelable: true, // Parent kann preventDefault() aufrufen
|
|
137
|
+
}));
|
|
138
|
+
// Mouse-move → Geo-Koordinaten (provider-spezifisch)
|
|
139
|
+
if (this.mapProvider?.onPointerMove) {
|
|
140
|
+
this.unsubscribePointerMove = this.mapProvider.onPointerMove((coordinate, pixel) => {
|
|
141
|
+
this.el.dispatchEvent(new CustomEvent(VMapEvents.MapMouseMove, {
|
|
142
|
+
detail: { coordinate, pixel },
|
|
143
|
+
bubbles: true,
|
|
144
|
+
composed: true,
|
|
145
|
+
}));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async componentWillLoad() {
|
|
150
|
+
log(MSG_COMPONENT + MSG.COMPONENT_WILL_LOAD);
|
|
151
|
+
if (this.useDefaultImportMap) {
|
|
152
|
+
log(MSG_COMPONENT + MSG.COMPONENT_WILL_LOAD + ' - useDefaultImportMap');
|
|
153
|
+
ensureImportMap();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// async componentDidLoad() {
|
|
157
|
+
// log(MSG_COMPONENT + MSG.COMPONENT_DID_LOAD);
|
|
158
|
+
// //test
|
|
159
|
+
// }
|
|
160
|
+
async componentWillRender() {
|
|
161
|
+
log(MSG_COMPONENT + MSG.COMPONENT_WILL_RENDER);
|
|
162
|
+
}
|
|
163
|
+
async componentDidRender() {
|
|
164
|
+
log(MSG_COMPONENT + MSG.COMPONENT_DID_RENDER);
|
|
165
|
+
await this.createMap();
|
|
166
|
+
this.el.addEventListener(VMapEvents.MapProviderReady, ((event) => {
|
|
167
|
+
log(MSG_COMPONENT + 'test - event: ', event);
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
disconnectedCallback() {
|
|
171
|
+
log(MSG_COMPONENT + MSG.COMPONENT_DISCONNECTED_CALLBACK);
|
|
172
|
+
this.reset();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Gibt zurück, ob der Karten-Provider initialisiert wurde und verwendet werden kann.
|
|
176
|
+
* @returns Promise mit `true`, sobald der Provider bereit ist, sonst `false`.
|
|
177
|
+
*/
|
|
178
|
+
async isMapProviderReady() {
|
|
179
|
+
const isReady = this.mapProvider !== null &&
|
|
180
|
+
this.mapProvider !== undefined &&
|
|
181
|
+
this.mapProvider !== NOOP_PROVIDER;
|
|
182
|
+
if (!isReady) {
|
|
183
|
+
log(MSG_COMPONENT + 'Map provider not yet ready.');
|
|
184
|
+
}
|
|
185
|
+
return isReady;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Setzt Kartenzentrum und Zoom (optional animiert).
|
|
189
|
+
* @param center [lon, lat] in WGS84
|
|
190
|
+
* @param zoom Zoomstufe
|
|
191
|
+
* @param options Zusätzliche Optionen (z. B. { animate: true, duration: 300 })
|
|
192
|
+
* @example
|
|
193
|
+
* await mapEl.setView([7.1, 50.7], 10, { animate: true, duration: 400 });
|
|
194
|
+
*/
|
|
195
|
+
async setView(coordinates, zoom) {
|
|
196
|
+
if (!this.mapProvider || this.mapProvider == NOOP_PROVIDER)
|
|
197
|
+
throw new Error(MSG_COMPONENT + 'Map-Provider noch nicht initialisiert.');
|
|
198
|
+
await Promise.resolve(this.mapProvider?.setView(coordinates, zoom));
|
|
199
|
+
}
|
|
200
|
+
ensureContainer() {
|
|
201
|
+
let el = this.el.shadowRoot.querySelector('#map');
|
|
202
|
+
if (!el) {
|
|
203
|
+
el = document.createElement('div');
|
|
204
|
+
el.id = 'map';
|
|
205
|
+
el.style.cssText =
|
|
206
|
+
'position:relative;width:100%;height:100%;display:block;';
|
|
207
|
+
this.el.shadowRoot.appendChild(el);
|
|
208
|
+
}
|
|
209
|
+
return el;
|
|
210
|
+
}
|
|
211
|
+
render() {
|
|
212
|
+
log(MSG_COMPONENT + MSG.COMPONENT_RENDER);
|
|
213
|
+
//return <div id="map-container"></div>;
|
|
214
|
+
return (h("div", { key: '41aca26c5cab5a3d7fef6169e9c4b8d27c7e65db' }, h("slot", { key: '4b04986c721a478cdfb900491e44106778c07df7' })));
|
|
215
|
+
}
|
|
216
|
+
static get is() { return "v-map"; }
|
|
217
|
+
static get encapsulation() { return "shadow"; }
|
|
218
|
+
static get originalStyleUrls() {
|
|
219
|
+
return {
|
|
220
|
+
"$": ["v-map.css"]
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
static get styleUrls() {
|
|
224
|
+
return {
|
|
225
|
+
"$": ["v-map.css"]
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
static get properties() {
|
|
229
|
+
return {
|
|
230
|
+
"flavour": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "Flavour",
|
|
235
|
+
"resolved": "\"cesium\" | \"deck\" | \"leaflet\" | \"ol\"",
|
|
236
|
+
"references": {
|
|
237
|
+
"Flavour": {
|
|
238
|
+
"location": "import",
|
|
239
|
+
"path": "../../types/flavour",
|
|
240
|
+
"id": "src/types/flavour.ts::Flavour",
|
|
241
|
+
"referenceLocation": "Flavour"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": false,
|
|
246
|
+
"optional": false,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [{
|
|
249
|
+
"name": "default",
|
|
250
|
+
"text": "\"ol\""
|
|
251
|
+
}, {
|
|
252
|
+
"name": "example",
|
|
253
|
+
"text": "<v-map flavour=\"leaflet\"></v-map>"
|
|
254
|
+
}],
|
|
255
|
+
"text": "Zu verwendender Karten-Provider.\nUnterst\u00FCtzte Werte: \"ol\" | \"leaflet\" | \"cesium\" | \"deck\"."
|
|
256
|
+
},
|
|
257
|
+
"getter": false,
|
|
258
|
+
"setter": false,
|
|
259
|
+
"reflect": true,
|
|
260
|
+
"attribute": "flavour",
|
|
261
|
+
"defaultValue": "'ol'"
|
|
262
|
+
},
|
|
263
|
+
"center": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"mutable": false,
|
|
266
|
+
"complexType": {
|
|
267
|
+
"original": "string",
|
|
268
|
+
"resolved": "string",
|
|
269
|
+
"references": {}
|
|
270
|
+
},
|
|
271
|
+
"required": false,
|
|
272
|
+
"optional": false,
|
|
273
|
+
"docs": {
|
|
274
|
+
"tags": [{
|
|
275
|
+
"name": "default",
|
|
276
|
+
"text": "[0, 0]"
|
|
277
|
+
}, {
|
|
278
|
+
"name": "example",
|
|
279
|
+
"text": "<v-map center=\"[11.5761, 48.1371]\" zoom=\"12\"></v-map>"
|
|
280
|
+
}],
|
|
281
|
+
"text": "Mittelpunkt der Karte im **WGS84**-Koordinatensystem.\nErwartet [lon, lat] (L\u00E4ngengrad, Breitengrad)."
|
|
282
|
+
},
|
|
283
|
+
"getter": false,
|
|
284
|
+
"setter": false,
|
|
285
|
+
"reflect": false,
|
|
286
|
+
"attribute": "center",
|
|
287
|
+
"defaultValue": "'0,0'"
|
|
288
|
+
},
|
|
289
|
+
"zoom": {
|
|
290
|
+
"type": "number",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "number",
|
|
294
|
+
"resolved": "number",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [{
|
|
301
|
+
"name": "default",
|
|
302
|
+
"text": "3"
|
|
303
|
+
}],
|
|
304
|
+
"text": "Anfangs-Zoomstufe. Skala abh\u00E4ngig vom Provider (typisch 0\u201320)."
|
|
305
|
+
},
|
|
306
|
+
"getter": false,
|
|
307
|
+
"setter": false,
|
|
308
|
+
"reflect": false,
|
|
309
|
+
"attribute": "zoom",
|
|
310
|
+
"defaultValue": "2"
|
|
311
|
+
},
|
|
312
|
+
"useDefaultImportMap": {
|
|
313
|
+
"type": "boolean",
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "boolean",
|
|
317
|
+
"resolved": "boolean",
|
|
318
|
+
"references": {}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": false,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "Falls true, injiziert v-map automatisch die Import-Map."
|
|
325
|
+
},
|
|
326
|
+
"getter": false,
|
|
327
|
+
"setter": false,
|
|
328
|
+
"reflect": false,
|
|
329
|
+
"attribute": "use-default-import-map",
|
|
330
|
+
"defaultValue": "true"
|
|
331
|
+
},
|
|
332
|
+
"cssMode": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"mutable": false,
|
|
335
|
+
"complexType": {
|
|
336
|
+
"original": "CssMode",
|
|
337
|
+
"resolved": "\"bundle\" | \"cdn\" | \"inline-min\" | \"none\"",
|
|
338
|
+
"references": {
|
|
339
|
+
"CssMode": {
|
|
340
|
+
"location": "import",
|
|
341
|
+
"path": "../../types/cssmode",
|
|
342
|
+
"id": "src/types/cssmode.ts::CssMode",
|
|
343
|
+
"referenceLocation": "CssMode"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": false,
|
|
348
|
+
"optional": false,
|
|
349
|
+
"docs": {
|
|
350
|
+
"tags": [{
|
|
351
|
+
"name": "default",
|
|
352
|
+
"text": "false"
|
|
353
|
+
}],
|
|
354
|
+
"text": "Aktiviert ein \u201ECSS-Only\u201C-Rendering (z. B. f\u00FCr einfache Tests/Layouts).\nBei `true` werden keine Provider initialisiert."
|
|
355
|
+
},
|
|
356
|
+
"getter": false,
|
|
357
|
+
"setter": false,
|
|
358
|
+
"reflect": false,
|
|
359
|
+
"attribute": "css-mode",
|
|
360
|
+
"defaultValue": "'cdn'"
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
static get events() {
|
|
365
|
+
return [{
|
|
366
|
+
"method": "mapProviderReady",
|
|
367
|
+
"name": "mapProviderReady",
|
|
368
|
+
"bubbles": true,
|
|
369
|
+
"cancelable": true,
|
|
370
|
+
"composed": false,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [{
|
|
373
|
+
"name": "event",
|
|
374
|
+
"text": "mapProviderReady"
|
|
375
|
+
}],
|
|
376
|
+
"text": "Wird ausgel\u00F6st, sobald der Karten-Provider initialisiert wurde und Layers entgegennimmt.\n`detail` enth\u00E4lt `{ provider, flavour }`."
|
|
377
|
+
},
|
|
378
|
+
"complexType": {
|
|
379
|
+
"original": "MapProviderDetail",
|
|
380
|
+
"resolved": "MapProviderDetail",
|
|
381
|
+
"references": {
|
|
382
|
+
"MapProviderDetail": {
|
|
383
|
+
"location": "import",
|
|
384
|
+
"path": "../../utils/events",
|
|
385
|
+
"id": "src/utils/events.ts::MapProviderDetail",
|
|
386
|
+
"referenceLocation": "MapProviderDetail"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}];
|
|
391
|
+
}
|
|
392
|
+
static get methods() {
|
|
393
|
+
return {
|
|
394
|
+
"isMapProviderReady": {
|
|
395
|
+
"complexType": {
|
|
396
|
+
"signature": "() => Promise<boolean>",
|
|
397
|
+
"parameters": [],
|
|
398
|
+
"references": {
|
|
399
|
+
"Promise": {
|
|
400
|
+
"location": "global",
|
|
401
|
+
"id": "global::Promise"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"return": "Promise<boolean>"
|
|
405
|
+
},
|
|
406
|
+
"docs": {
|
|
407
|
+
"text": "Gibt zur\u00FCck, ob der Karten-Provider initialisiert wurde und verwendet werden kann.",
|
|
408
|
+
"tags": [{
|
|
409
|
+
"name": "returns",
|
|
410
|
+
"text": "Promise mit `true`, sobald der Provider bereit ist, sonst `false`."
|
|
411
|
+
}]
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"setView": {
|
|
415
|
+
"complexType": {
|
|
416
|
+
"signature": "(coordinates: [number, number], zoom: number) => Promise<void>",
|
|
417
|
+
"parameters": [{
|
|
418
|
+
"name": "coordinates",
|
|
419
|
+
"type": "[number, number]",
|
|
420
|
+
"docs": ""
|
|
421
|
+
}, {
|
|
422
|
+
"name": "zoom",
|
|
423
|
+
"type": "number",
|
|
424
|
+
"docs": "Zoomstufe"
|
|
425
|
+
}],
|
|
426
|
+
"references": {
|
|
427
|
+
"Promise": {
|
|
428
|
+
"location": "global",
|
|
429
|
+
"id": "global::Promise"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"return": "Promise<void>"
|
|
433
|
+
},
|
|
434
|
+
"docs": {
|
|
435
|
+
"text": "Setzt Kartenzentrum und Zoom (optional animiert).",
|
|
436
|
+
"tags": [{
|
|
437
|
+
"name": "param",
|
|
438
|
+
"text": "center [lon, lat] in WGS84"
|
|
439
|
+
}, {
|
|
440
|
+
"name": "param",
|
|
441
|
+
"text": "zoom Zoomstufe"
|
|
442
|
+
}, {
|
|
443
|
+
"name": "param",
|
|
444
|
+
"text": "options Zus\u00E4tzliche Optionen (z. B. { animate: true, duration: 300 })"
|
|
445
|
+
}, {
|
|
446
|
+
"name": "example",
|
|
447
|
+
"text": "await mapEl.setView([7.1, 50.7], 10, { animate: true, duration: 400 });"
|
|
448
|
+
}]
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
static get elementRef() { return "el"; }
|
|
454
|
+
static get watchers() {
|
|
455
|
+
return [{
|
|
456
|
+
"propName": "flavour",
|
|
457
|
+
"methodName": "onFlavourChanged"
|
|
458
|
+
}];
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/*
|
|
462
|
+
export interface VMap {
|
|
463
|
+
flavour: 'ol' | 'cesium' | 'leaflet';
|
|
464
|
+
center: string;
|
|
465
|
+
zoom: number;
|
|
466
|
+
}
|
|
467
|
+
*/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { afterEach, beforeAll, describe, expect, it } from "vitest";
|
|
2
|
+
import { createLiveMap, loadVMapBundle, onceEvent, waitFor, waitForHydration, } from "../../testing/browser-test-utils";
|
|
3
|
+
describe('v-map browser', () => {
|
|
4
|
+
beforeAll(async () => {
|
|
5
|
+
await loadVMapBundle();
|
|
6
|
+
await customElements.whenDefined('v-map');
|
|
7
|
+
});
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
document.body.innerHTML = '';
|
|
10
|
+
});
|
|
11
|
+
it('hydrates and reports a ready live map provider', async () => {
|
|
12
|
+
const map = createLiveMap();
|
|
13
|
+
const readyEvent = onceEvent(map, 'map-provider-ready');
|
|
14
|
+
document.body.appendChild(map);
|
|
15
|
+
await waitForHydration(map);
|
|
16
|
+
await readyEvent;
|
|
17
|
+
await waitFor(() => !!map.shadowRoot?.querySelector('#map'));
|
|
18
|
+
expect(map.getAttribute('center')).toBe('11.5761,48.1371');
|
|
19
|
+
expect(map.getAttribute('zoom')).toBe('12');
|
|
20
|
+
expect(await map.isMapProviderReady()).toBe(true);
|
|
21
|
+
});
|
|
22
|
+
it('emits shutdown when the live map is removed from the DOM', async () => {
|
|
23
|
+
const map = createLiveMap();
|
|
24
|
+
const readyEvent = onceEvent(map, 'map-provider-ready');
|
|
25
|
+
document.body.appendChild(map);
|
|
26
|
+
await waitForHydration(map);
|
|
27
|
+
await readyEvent;
|
|
28
|
+
const shutdownEvent = onceEvent(map, 'map-provider-will-shutdown');
|
|
29
|
+
map.remove();
|
|
30
|
+
const event = await shutdownEvent;
|
|
31
|
+
expect(event.type).toBe('map-provider-will-shutdown');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{display:block;height:100%}.root{height:100%}
|