@deck.gl/carto 9.0.0-beta.2 → 9.0.0-beta.4
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/{typed → dist}/api/carto-api-error.d.ts +1 -1
- package/dist/api/carto-api-error.d.ts.map +1 -0
- package/dist/api/carto-api-error.js +47 -0
- package/dist/{esm/api → api}/common.js +4 -5
- package/{typed → dist}/api/endpoints.d.ts +1 -1
- package/dist/api/endpoints.d.ts.map +1 -0
- package/dist/api/endpoints.js +22 -0
- package/dist/api/fetch-map.js +187 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +3 -0
- package/{typed → dist}/api/layer-map.d.ts +6 -6
- package/dist/api/layer-map.d.ts.map +1 -0
- package/dist/api/layer-map.js +373 -0
- package/dist/api/parse-map.js +250 -0
- package/{typed → dist}/api/query.d.ts +1 -1
- package/dist/api/query.d.ts.map +1 -0
- package/dist/api/query.js +24 -0
- package/{typed → dist}/api/request-with-parameters.d.ts +1 -1
- package/dist/api/request-with-parameters.d.ts.map +1 -0
- package/dist/api/request-with-parameters.js +53 -0
- package/{typed → dist}/api/types.d.ts +18 -1
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +20 -0
- package/dist/basemap.js +9 -0
- package/dist/cartoRasterTile-worker.js +2 -2
- package/dist/cartoSpatialTile-worker.js +7 -7
- package/dist/cartoVectorTile-worker.js +3 -3
- package/dist/dist.dev.js +1252 -1073
- package/dist/index.cjs +2708 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/{typed → dist}/layers/h3-tile-layer.d.ts +2 -2
- package/dist/layers/h3-tile-layer.d.ts.map +1 -0
- package/dist/layers/h3-tile-layer.js +64 -0
- package/dist/layers/h3-tileset-2d.js +99 -0
- package/dist/layers/point-label-layer.js +150 -0
- package/dist/layers/quadbin-layer.js +21 -0
- package/{typed → dist}/layers/quadbin-tile-layer.d.ts +3 -3
- package/dist/layers/quadbin-tile-layer.d.ts.map +1 -0
- package/dist/layers/quadbin-tile-layer.js +47 -0
- package/dist/layers/quadbin-tileset-2d.js +27 -0
- package/dist/layers/quadbin-utils.js +21 -0
- package/dist/layers/raster-layer-vertex.glsl.d.ts +3 -0
- package/dist/{esm/layers → layers}/raster-layer-vertex.glsl.js +2 -3
- package/{typed → dist}/layers/raster-layer.d.ts.map +1 -1
- package/dist/layers/raster-layer.js +99 -0
- package/{typed → dist}/layers/raster-tile-layer.d.ts +3 -3
- package/dist/layers/raster-tile-layer.d.ts.map +1 -0
- package/dist/layers/raster-tile-layer.js +43 -0
- package/dist/layers/schema/carto-properties-tile-loader.js +21 -0
- package/{typed → dist}/layers/schema/carto-properties-tile.d.ts +1 -1
- package/dist/layers/schema/carto-properties-tile.d.ts.map +1 -0
- package/dist/layers/schema/carto-properties-tile.js +14 -0
- package/{typed → dist}/layers/schema/carto-raster-tile-loader.d.ts +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.d.ts.map +1 -0
- package/dist/layers/schema/carto-raster-tile-loader.js +36 -0
- package/dist/layers/schema/carto-raster-tile.js +46 -0
- package/dist/layers/schema/carto-spatial-tile-loader.js +35 -0
- package/{typed → dist}/layers/schema/carto-spatial-tile.d.ts +2 -2
- package/dist/layers/schema/carto-spatial-tile.d.ts.map +1 -0
- package/dist/layers/schema/carto-spatial-tile.js +38 -0
- package/dist/layers/schema/carto-tile.js +187 -0
- package/dist/layers/schema/carto-vector-tile-loader.js +65 -0
- package/dist/layers/schema/fast-pbf.js +7 -0
- package/dist/layers/schema/spatialjson-utils.js +15 -0
- package/dist/layers/schema/tile-loader-utils.js +6 -0
- package/{typed → dist}/layers/spatial-index-tile-layer.d.ts +1 -1
- package/{typed → dist}/layers/spatial-index-tile-layer.d.ts.map +1 -1
- package/dist/layers/spatial-index-tile-layer.js +64 -0
- package/{typed → dist}/layers/utils.d.ts +3 -3
- package/dist/layers/utils.d.ts.map +1 -0
- package/dist/layers/utils.js +74 -0
- package/{typed → dist}/layers/vector-tile-layer.d.ts +2 -1
- package/dist/layers/vector-tile-layer.d.ts.map +1 -0
- package/dist/layers/vector-tile-layer.js +102 -0
- package/{typed → dist}/sources/base-source.d.ts +2 -2
- package/dist/sources/base-source.d.ts.map +1 -0
- package/dist/sources/base-source.js +52 -0
- package/dist/sources/boundary-query-source.d.ts +11 -0
- package/dist/sources/boundary-query-source.d.ts.map +1 -0
- package/dist/sources/boundary-query-source.js +19 -0
- package/{typed → dist}/sources/boundary-table-source.d.ts +2 -2
- package/dist/sources/boundary-table-source.d.ts.map +1 -0
- package/dist/sources/boundary-table-source.js +16 -0
- package/{typed → dist}/sources/h3-query-source.d.ts +1 -1
- package/{typed → dist}/sources/h3-query-source.d.ts.map +1 -1
- package/dist/sources/h3-query-source.js +18 -0
- package/{typed → dist}/sources/h3-table-source.d.ts +1 -1
- package/{typed → dist}/sources/h3-table-source.d.ts.map +1 -1
- package/dist/sources/h3-table-source.js +18 -0
- package/{typed → dist}/sources/h3-tileset-source.d.ts +1 -1
- package/dist/sources/h3-tileset-source.d.ts.map +1 -0
- package/dist/sources/h3-tileset-source.js +6 -0
- package/dist/sources/index.d.ts +27 -0
- package/dist/sources/index.d.ts.map +1 -0
- package/dist/sources/index.js +13 -0
- package/{typed → dist}/sources/quadbin-query-source.d.ts +1 -1
- package/{typed → dist}/sources/quadbin-query-source.d.ts.map +1 -1
- package/dist/sources/quadbin-query-source.js +18 -0
- package/{typed → dist}/sources/quadbin-table-source.d.ts +1 -1
- package/{typed → dist}/sources/quadbin-table-source.d.ts.map +1 -1
- package/dist/sources/quadbin-table-source.js +18 -0
- package/{typed → dist}/sources/quadbin-tileset-source.d.ts +1 -1
- package/{typed → dist}/sources/quadbin-tileset-source.d.ts.map +1 -1
- package/dist/sources/quadbin-tileset-source.js +6 -0
- package/{typed → dist}/sources/raster-source.d.ts +1 -1
- package/dist/sources/raster-source.d.ts.map +1 -0
- package/dist/sources/raster-source.js +6 -0
- package/{typed → dist}/sources/types.d.ts +7 -1
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +1 -0
- package/dist/sources/vector-query-source.d.ts +6 -0
- package/dist/sources/vector-query-source.d.ts.map +1 -0
- package/dist/sources/vector-query-source.js +16 -0
- package/dist/sources/vector-table-source.d.ts +4 -0
- package/dist/sources/vector-table-source.d.ts.map +1 -0
- package/dist/sources/vector-table-source.js +13 -0
- package/{typed → dist}/sources/vector-tileset-source.d.ts +1 -1
- package/{typed → dist}/sources/vector-tileset-source.d.ts.map +1 -1
- package/dist/sources/vector-tileset-source.js +6 -0
- package/{typed → dist}/style/color-bins-style.d.ts +2 -2
- package/dist/style/color-bins-style.d.ts.map +1 -0
- package/dist/style/color-bins-style.js +21 -0
- package/{typed → dist}/style/color-categories-style.d.ts +2 -2
- package/dist/style/color-categories-style.d.ts.map +1 -0
- package/dist/style/color-categories-style.js +25 -0
- package/{typed → dist}/style/color-continuous-style.d.ts +2 -2
- package/dist/style/color-continuous-style.d.ts.map +1 -0
- package/dist/style/color-continuous-style.js +21 -0
- package/dist/style/palette.js +62 -0
- package/dist/style/utils.js +11 -0
- package/{typed → dist}/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +41 -0
- package/dist/workers/cartoRasterTile.js +3 -0
- package/dist/workers/cartoSpatialTile.js +3 -0
- package/dist/workers/cartoVectorTile.js +3 -0
- package/dist.min.js +30 -44
- package/package.json +21 -14
- package/src/api/fetch-map.ts +1 -1
- package/src/api/query.ts +1 -1
- package/src/api/types.ts +20 -0
- package/src/index.ts +4 -4
- package/src/layers/raster-layer-vertex.glsl.ts +2 -2
- package/src/layers/raster-layer.ts +3 -1
- package/src/layers/spatial-index-tile-layer.ts +3 -2
- package/src/layers/vector-tile-layer.ts +6 -1
- package/src/sources/boundary-query-source.ts +27 -9
- package/src/sources/boundary-table-source.ts +13 -8
- package/src/sources/types.ts +8 -1
- package/src/sources/vector-query-source.ts +21 -3
- package/src/sources/vector-table-source.ts +13 -3
- package/dist/es5/api/carto-api-error.js +0 -83
- package/dist/es5/api/carto-api-error.js.map +0 -1
- package/dist/es5/api/common.js +0 -25
- package/dist/es5/api/common.js.map +0 -1
- package/dist/es5/api/endpoints.js +0 -61
- package/dist/es5/api/endpoints.js.map +0 -1
- package/dist/es5/api/fetch-map.js +0 -566
- package/dist/es5/api/fetch-map.js.map +0 -1
- package/dist/es5/api/index.js +0 -30
- package/dist/es5/api/index.js.map +0 -1
- package/dist/es5/api/layer-map.js +0 -634
- package/dist/es5/api/layer-map.js.map +0 -1
- package/dist/es5/api/parse-map.js +0 -347
- package/dist/es5/api/parse-map.js.map +0 -1
- package/dist/es5/api/query.js +0 -81
- package/dist/es5/api/query.js.map +0 -1
- package/dist/es5/api/request-with-parameters.js +0 -150
- package/dist/es5/api/request-with-parameters.js.map +0 -1
- package/dist/es5/api/types.js +0 -21
- package/dist/es5/api/types.js.map +0 -1
- package/dist/es5/basemap.js +0 -17
- package/dist/es5/basemap.js.map +0 -1
- package/dist/es5/index.js +0 -205
- package/dist/es5/index.js.map +0 -1
- package/dist/es5/layers/h3-tile-layer.js +0 -128
- package/dist/es5/layers/h3-tile-layer.js.map +0 -1
- package/dist/es5/layers/h3-tileset-2d.js +0 -172
- package/dist/es5/layers/h3-tileset-2d.js.map +0 -1
- package/dist/es5/layers/point-label-layer.js +0 -263
- package/dist/es5/layers/point-label-layer.js.map +0 -1
- package/dist/es5/layers/quadbin-layer.js +0 -72
- package/dist/es5/layers/quadbin-layer.js.map +0 -1
- package/dist/es5/layers/quadbin-tile-layer.js +0 -103
- package/dist/es5/layers/quadbin-tile-layer.js.map +0 -1
- package/dist/es5/layers/quadbin-tileset-2d.js +0 -76
- package/dist/es5/layers/quadbin-tileset-2d.js.map +0 -1
- package/dist/es5/layers/quadbin-utils.js +0 -60
- package/dist/es5/layers/quadbin-utils.js.map +0 -1
- package/dist/es5/layers/raster-layer-vertex.glsl.js +0 -9
- package/dist/es5/layers/raster-layer-vertex.glsl.js.map +0 -1
- package/dist/es5/layers/raster-layer.js +0 -174
- package/dist/es5/layers/raster-layer.js.map +0 -1
- package/dist/es5/layers/raster-tile-layer.js +0 -91
- package/dist/es5/layers/raster-tile-layer.js.map +0 -1
- package/dist/es5/layers/schema/carto-properties-tile-loader.js +0 -60
- package/dist/es5/layers/schema/carto-properties-tile-loader.js.map +0 -1
- package/dist/es5/layers/schema/carto-properties-tile.js +0 -38
- package/dist/es5/layers/schema/carto-properties-tile.js.map +0 -1
- package/dist/es5/layers/schema/carto-raster-tile-loader.js +0 -89
- package/dist/es5/layers/schema/carto-raster-tile-loader.js.map +0 -1
- package/dist/es5/layers/schema/carto-raster-tile.js +0 -79
- package/dist/es5/layers/schema/carto-raster-tile.js.map +0 -1
- package/dist/es5/layers/schema/carto-spatial-tile-loader.js +0 -81
- package/dist/es5/layers/schema/carto-spatial-tile-loader.js.map +0 -1
- package/dist/es5/layers/schema/carto-spatial-tile.js +0 -80
- package/dist/es5/layers/schema/carto-spatial-tile.js.map +0 -1
- package/dist/es5/layers/schema/carto-tile.js +0 -269
- package/dist/es5/layers/schema/carto-tile.js.map +0 -1
- package/dist/es5/layers/schema/carto-vector-tile-loader.js +0 -120
- package/dist/es5/layers/schema/carto-vector-tile-loader.js.map +0 -1
- package/dist/es5/layers/schema/fast-pbf.js +0 -14
- package/dist/es5/layers/schema/fast-pbf.js.map +0 -1
- package/dist/es5/layers/schema/spatialjson-utils.js +0 -42
- package/dist/es5/layers/schema/spatialjson-utils.js.map +0 -1
- package/dist/es5/layers/schema/tile-loader-utils.js +0 -17
- package/dist/es5/layers/schema/tile-loader-utils.js.map +0 -1
- package/dist/es5/layers/spatial-index-tile-layer.js +0 -126
- package/dist/es5/layers/spatial-index-tile-layer.js.map +0 -1
- package/dist/es5/layers/utils.js +0 -131
- package/dist/es5/layers/utils.js.map +0 -1
- package/dist/es5/layers/vector-tile-layer.js +0 -248
- package/dist/es5/layers/vector-tile-layer.js.map +0 -1
- package/dist/es5/sources/base-source.js +0 -128
- package/dist/es5/sources/base-source.js.map +0 -1
- package/dist/es5/sources/boundary-query-source.js +0 -51
- package/dist/es5/sources/boundary-query-source.js.map +0 -1
- package/dist/es5/sources/boundary-table-source.js +0 -51
- package/dist/es5/sources/boundary-table-source.js.map +0 -1
- package/dist/es5/sources/h3-query-source.js +0 -56
- package/dist/es5/sources/h3-query-source.js.map +0 -1
- package/dist/es5/sources/h3-table-source.js +0 -56
- package/dist/es5/sources/h3-table-source.js.map +0 -1
- package/dist/es5/sources/h3-tileset-source.js +0 -43
- package/dist/es5/sources/h3-tileset-source.js.map +0 -1
- package/dist/es5/sources/index.js +0 -110
- package/dist/es5/sources/index.js.map +0 -1
- package/dist/es5/sources/quadbin-query-source.js +0 -56
- package/dist/es5/sources/quadbin-query-source.js.map +0 -1
- package/dist/es5/sources/quadbin-table-source.js +0 -56
- package/dist/es5/sources/quadbin-table-source.js.map +0 -1
- package/dist/es5/sources/quadbin-tileset-source.js +0 -43
- package/dist/es5/sources/quadbin-tileset-source.js.map +0 -1
- package/dist/es5/sources/raster-source.js +0 -43
- package/dist/es5/sources/raster-source.js.map +0 -1
- package/dist/es5/sources/types.js +0 -2
- package/dist/es5/sources/types.js.map +0 -1
- package/dist/es5/sources/vector-query-source.js +0 -51
- package/dist/es5/sources/vector-query-source.js.map +0 -1
- package/dist/es5/sources/vector-table-source.js +0 -51
- package/dist/es5/sources/vector-table-source.js.map +0 -1
- package/dist/es5/sources/vector-tileset-source.js +0 -43
- package/dist/es5/sources/vector-tileset-source.js.map +0 -1
- package/dist/es5/style/color-bins-style.js +0 -37
- package/dist/es5/style/color-bins-style.js.map +0 -1
- package/dist/es5/style/color-categories-style.js +0 -65
- package/dist/es5/style/color-categories-style.js.map +0 -1
- package/dist/es5/style/color-continuous-style.js +0 -37
- package/dist/es5/style/color-continuous-style.js.map +0 -1
- package/dist/es5/style/palette.js +0 -81
- package/dist/es5/style/palette.js.map +0 -1
- package/dist/es5/style/utils.js +0 -28
- package/dist/es5/style/utils.js.map +0 -1
- package/dist/es5/utils.js +0 -65
- package/dist/es5/utils.js.map +0 -1
- package/dist/es5/workers/cartoRasterTile.js +0 -10
- package/dist/es5/workers/cartoRasterTile.js.map +0 -1
- package/dist/es5/workers/cartoSpatialTile.js +0 -10
- package/dist/es5/workers/cartoSpatialTile.js.map +0 -1
- package/dist/es5/workers/cartoVectorTile.js +0 -10
- package/dist/es5/workers/cartoVectorTile.js.map +0 -1
- package/dist/esm/api/carto-api-error.js +0 -46
- package/dist/esm/api/carto-api-error.js.map +0 -1
- package/dist/esm/api/common.js.map +0 -1
- package/dist/esm/api/endpoints.js +0 -41
- package/dist/esm/api/endpoints.js.map +0 -1
- package/dist/esm/api/fetch-map.js +0 -298
- package/dist/esm/api/fetch-map.js.map +0 -1
- package/dist/esm/api/index.js +0 -4
- package/dist/esm/api/index.js.map +0 -1
- package/dist/esm/api/layer-map.js +0 -520
- package/dist/esm/api/layer-map.js.map +0 -1
- package/dist/esm/api/parse-map.js +0 -343
- package/dist/esm/api/parse-map.js.map +0 -1
- package/dist/esm/api/query.js +0 -40
- package/dist/esm/api/query.js.map +0 -1
- package/dist/esm/api/request-with-parameters.js +0 -82
- package/dist/esm/api/request-with-parameters.js.map +0 -1
- package/dist/esm/api/types.js +0 -14
- package/dist/esm/api/types.js.map +0 -1
- package/dist/esm/basemap.js +0 -10
- package/dist/esm/basemap.js.map +0 -1
- package/dist/esm/index.js +0 -35
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/layers/h3-tile-layer.js +0 -77
- package/dist/esm/layers/h3-tile-layer.js.map +0 -1
- package/dist/esm/layers/h3-tileset-2d.js +0 -119
- package/dist/esm/layers/h3-tileset-2d.js.map +0 -1
- package/dist/esm/layers/point-label-layer.js +0 -194
- package/dist/esm/layers/point-label-layer.js.map +0 -1
- package/dist/esm/layers/quadbin-layer.js +0 -31
- package/dist/esm/layers/quadbin-layer.js.map +0 -1
- package/dist/esm/layers/quadbin-tile-layer.js +0 -51
- package/dist/esm/layers/quadbin-tile-layer.js.map +0 -1
- package/dist/esm/layers/quadbin-tileset-2d.js +0 -39
- package/dist/esm/layers/quadbin-tileset-2d.js.map +0 -1
- package/dist/esm/layers/quadbin-utils.js +0 -23
- package/dist/esm/layers/quadbin-utils.js.map +0 -1
- package/dist/esm/layers/raster-layer-vertex.glsl.js.map +0 -1
- package/dist/esm/layers/raster-layer.js +0 -108
- package/dist/esm/layers/raster-layer.js.map +0 -1
- package/dist/esm/layers/raster-tile-layer.js +0 -48
- package/dist/esm/layers/raster-tile-layer.js.map +0 -1
- package/dist/esm/layers/schema/carto-properties-tile-loader.js +0 -23
- package/dist/esm/layers/schema/carto-properties-tile-loader.js.map +0 -1
- package/dist/esm/layers/schema/carto-properties-tile.js +0 -18
- package/dist/esm/layers/schema/carto-properties-tile.js.map +0 -1
- package/dist/esm/layers/schema/carto-raster-tile-loader.js +0 -54
- package/dist/esm/layers/schema/carto-raster-tile-loader.js.map +0 -1
- package/dist/esm/layers/schema/carto-raster-tile.js +0 -51
- package/dist/esm/layers/schema/carto-raster-tile.js.map +0 -1
- package/dist/esm/layers/schema/carto-spatial-tile-loader.js +0 -44
- package/dist/esm/layers/schema/carto-spatial-tile-loader.js.map +0 -1
- package/dist/esm/layers/schema/carto-spatial-tile.js +0 -47
- package/dist/esm/layers/schema/carto-spatial-tile.js.map +0 -1
- package/dist/esm/layers/schema/carto-tile.js +0 -197
- package/dist/esm/layers/schema/carto-tile.js.map +0 -1
- package/dist/esm/layers/schema/carto-vector-tile-loader.js +0 -82
- package/dist/esm/layers/schema/carto-vector-tile-loader.js.map +0 -1
- package/dist/esm/layers/schema/fast-pbf.js +0 -7
- package/dist/esm/layers/schema/fast-pbf.js.map +0 -1
- package/dist/esm/layers/schema/spatialjson-utils.js +0 -27
- package/dist/esm/layers/schema/spatialjson-utils.js.map +0 -1
- package/dist/esm/layers/schema/tile-loader-utils.js +0 -7
- package/dist/esm/layers/schema/tile-loader-utils.js.map +0 -1
- package/dist/esm/layers/spatial-index-tile-layer.js +0 -86
- package/dist/esm/layers/spatial-index-tile-layer.js.map +0 -1
- package/dist/esm/layers/utils.js +0 -85
- package/dist/esm/layers/utils.js.map +0 -1
- package/dist/esm/layers/vector-tile-layer.js +0 -143
- package/dist/esm/layers/vector-tile-layer.js.map +0 -1
- package/dist/esm/sources/base-source.js +0 -72
- package/dist/esm/sources/base-source.js.map +0 -1
- package/dist/esm/sources/boundary-query-source.js +0 -21
- package/dist/esm/sources/boundary-query-source.js.map +0 -1
- package/dist/esm/sources/boundary-table-source.js +0 -21
- package/dist/esm/sources/boundary-table-source.js.map +0 -1
- package/dist/esm/sources/h3-query-source.js +0 -27
- package/dist/esm/sources/h3-query-source.js.map +0 -1
- package/dist/esm/sources/h3-table-source.js +0 -27
- package/dist/esm/sources/h3-table-source.js.map +0 -1
- package/dist/esm/sources/h3-tileset-source.js +0 -11
- package/dist/esm/sources/h3-tileset-source.js.map +0 -1
- package/dist/esm/sources/index.js +0 -14
- package/dist/esm/sources/index.js.map +0 -1
- package/dist/esm/sources/quadbin-query-source.js +0 -27
- package/dist/esm/sources/quadbin-query-source.js.map +0 -1
- package/dist/esm/sources/quadbin-table-source.js +0 -27
- package/dist/esm/sources/quadbin-table-source.js.map +0 -1
- package/dist/esm/sources/quadbin-tileset-source.js +0 -11
- package/dist/esm/sources/quadbin-tileset-source.js.map +0 -1
- package/dist/esm/sources/raster-source.js +0 -11
- package/dist/esm/sources/raster-source.js.map +0 -1
- package/dist/esm/sources/types.js +0 -2
- package/dist/esm/sources/types.js.map +0 -1
- package/dist/esm/sources/vector-query-source.js +0 -20
- package/dist/esm/sources/vector-query-source.js.map +0 -1
- package/dist/esm/sources/vector-table-source.js +0 -20
- package/dist/esm/sources/vector-table-source.js.map +0 -1
- package/dist/esm/sources/vector-tileset-source.js +0 -11
- package/dist/esm/sources/vector-tileset-source.js.map +0 -1
- package/dist/esm/style/color-bins-style.js +0 -19
- package/dist/esm/style/color-bins-style.js.map +0 -1
- package/dist/esm/style/color-categories-style.js +0 -24
- package/dist/esm/style/color-categories-style.js.map +0 -1
- package/dist/esm/style/color-continuous-style.js +0 -19
- package/dist/esm/style/color-continuous-style.js.map +0 -1
- package/dist/esm/style/palette.js +0 -51
- package/dist/esm/style/palette.js.map +0 -1
- package/dist/esm/style/utils.js +0 -15
- package/dist/esm/style/utils.js.map +0 -1
- package/dist/esm/utils.js +0 -51
- package/dist/esm/utils.js.map +0 -1
- package/dist/esm/workers/cartoRasterTile.js +0 -4
- package/dist/esm/workers/cartoRasterTile.js.map +0 -1
- package/dist/esm/workers/cartoSpatialTile.js +0 -4
- package/dist/esm/workers/cartoSpatialTile.js.map +0 -1
- package/dist/esm/workers/cartoVectorTile.js +0 -4
- package/dist/esm/workers/cartoVectorTile.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/typed/api/carto-api-error.d.ts.map +0 -1
- package/typed/api/endpoints.d.ts.map +0 -1
- package/typed/api/index.d.ts +0 -7
- package/typed/api/index.d.ts.map +0 -1
- package/typed/api/layer-map.d.ts.map +0 -1
- package/typed/api/query.d.ts.map +0 -1
- package/typed/api/request-with-parameters.d.ts.map +0 -1
- package/typed/api/types.d.ts.map +0 -1
- package/typed/index.d.ts +0 -37
- package/typed/index.d.ts.map +0 -1
- package/typed/layers/h3-tile-layer.d.ts.map +0 -1
- package/typed/layers/quadbin-tile-layer.d.ts.map +0 -1
- package/typed/layers/raster-layer-vertex.glsl.d.ts +0 -3
- package/typed/layers/raster-tile-layer.d.ts.map +0 -1
- package/typed/layers/schema/carto-properties-tile.d.ts.map +0 -1
- package/typed/layers/schema/carto-raster-tile-loader.d.ts.map +0 -1
- package/typed/layers/schema/carto-spatial-tile.d.ts.map +0 -1
- package/typed/layers/utils.d.ts.map +0 -1
- package/typed/layers/vector-tile-layer.d.ts.map +0 -1
- package/typed/sources/base-source.d.ts.map +0 -1
- package/typed/sources/boundary-query-source.d.ts +0 -10
- package/typed/sources/boundary-query-source.d.ts.map +0 -1
- package/typed/sources/boundary-table-source.d.ts.map +0 -1
- package/typed/sources/h3-tileset-source.d.ts.map +0 -1
- package/typed/sources/index.d.ts +0 -27
- package/typed/sources/index.d.ts.map +0 -1
- package/typed/sources/raster-source.d.ts.map +0 -1
- package/typed/sources/types.d.ts.map +0 -1
- package/typed/sources/vector-query-source.d.ts +0 -4
- package/typed/sources/vector-query-source.d.ts.map +0 -1
- package/typed/sources/vector-table-source.d.ts +0 -4
- package/typed/sources/vector-table-source.d.ts.map +0 -1
- package/typed/style/color-bins-style.d.ts.map +0 -1
- package/typed/style/color-categories-style.d.ts.map +0 -1
- package/typed/style/color-continuous-style.d.ts.map +0 -1
- package/typed/utils.d.ts.map +0 -1
- /package/{typed → dist}/api/common.d.ts +0 -0
- /package/{typed → dist}/api/common.d.ts.map +0 -0
- /package/{typed → dist}/api/fetch-map.d.ts +0 -0
- /package/{typed → dist}/api/fetch-map.d.ts.map +0 -0
- /package/{typed → dist}/api/parse-map.d.ts +0 -0
- /package/{typed → dist}/api/parse-map.d.ts.map +0 -0
- /package/{typed → dist}/basemap.d.ts +0 -0
- /package/{typed → dist}/basemap.d.ts.map +0 -0
- /package/{typed → dist}/layers/h3-tileset-2d.d.ts +0 -0
- /package/{typed → dist}/layers/h3-tileset-2d.d.ts.map +0 -0
- /package/{typed → dist}/layers/point-label-layer.d.ts +0 -0
- /package/{typed → dist}/layers/point-label-layer.d.ts.map +0 -0
- /package/{typed → dist}/layers/quadbin-layer.d.ts +0 -0
- /package/{typed → dist}/layers/quadbin-layer.d.ts.map +0 -0
- /package/{typed → dist}/layers/quadbin-tileset-2d.d.ts +0 -0
- /package/{typed → dist}/layers/quadbin-tileset-2d.d.ts.map +0 -0
- /package/{typed → dist}/layers/quadbin-utils.d.ts +0 -0
- /package/{typed → dist}/layers/quadbin-utils.d.ts.map +0 -0
- /package/{typed → dist}/layers/raster-layer-vertex.glsl.d.ts.map +0 -0
- /package/{typed → dist}/layers/raster-layer.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-properties-tile-loader.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-properties-tile-loader.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/carto-raster-tile.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-raster-tile.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/carto-spatial-tile-loader.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-spatial-tile-loader.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/carto-tile.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-tile.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/carto-vector-tile-loader.d.ts +0 -0
- /package/{typed → dist}/layers/schema/carto-vector-tile-loader.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/fast-pbf.d.ts +0 -0
- /package/{typed → dist}/layers/schema/fast-pbf.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/spatialjson-utils.d.ts +0 -0
- /package/{typed → dist}/layers/schema/spatialjson-utils.d.ts.map +0 -0
- /package/{typed → dist}/layers/schema/tile-loader-utils.d.ts +0 -0
- /package/{typed → dist}/layers/schema/tile-loader-utils.d.ts.map +0 -0
- /package/{typed → dist}/style/palette.d.ts +0 -0
- /package/{typed → dist}/style/palette.d.ts.map +0 -0
- /package/{typed → dist}/style/utils.d.ts +0 -0
- /package/{typed → dist}/style/utils.d.ts.map +0 -0
- /package/{typed → dist}/workers/cartoRasterTile.d.ts +0 -0
- /package/{typed → dist}/workers/cartoRasterTile.d.ts.map +0 -0
- /package/{typed → dist}/workers/cartoSpatialTile.d.ts +0 -0
- /package/{typed → dist}/workers/cartoSpatialTile.d.ts.map +0 -0
- /package/{typed → dist}/workers/cartoVectorTile.d.ts +0 -0
- /package/{typed → dist}/workers/cartoVectorTile.d.ts.map +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { registerLoaders } from '@loaders.gl/core';
|
|
2
|
+
import CartoPropertiesTileLoader from "./schema/carto-properties-tile-loader.js";
|
|
3
|
+
import CartoVectorTileLoader from "./schema/carto-vector-tile-loader.js";
|
|
4
|
+
registerLoaders([CartoPropertiesTileLoader, CartoVectorTileLoader]);
|
|
5
|
+
import { ClipExtension } from '@deck.gl/extensions';
|
|
6
|
+
import { MVTLayer, _getURLFromTemplate } from '@deck.gl/geo-layers';
|
|
7
|
+
import { GeoJsonLayer } from '@deck.gl/layers';
|
|
8
|
+
import { binaryToGeojson } from '@loaders.gl/gis';
|
|
9
|
+
import { TilejsonPropType, injectAccessToken, mergeBoundaryData } from "./utils.js";
|
|
10
|
+
const defaultProps = {
|
|
11
|
+
...MVTLayer.defaultProps,
|
|
12
|
+
data: TilejsonPropType,
|
|
13
|
+
dataComparator: TilejsonPropType.equal
|
|
14
|
+
};
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
export default class VectorTileLayer extends MVTLayer {
|
|
17
|
+
static { this.layerName = 'VectorTileLayer'; }
|
|
18
|
+
static { this.defaultProps = defaultProps; }
|
|
19
|
+
constructor(...propObjects) {
|
|
20
|
+
// Force externally visible props type, as it is not possible modify via extension
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
super(...propObjects);
|
|
23
|
+
}
|
|
24
|
+
initializeState() {
|
|
25
|
+
super.initializeState();
|
|
26
|
+
this.setState({ binary: true });
|
|
27
|
+
}
|
|
28
|
+
updateState(parameters) {
|
|
29
|
+
const { props } = parameters;
|
|
30
|
+
if (props.data) {
|
|
31
|
+
super.updateState(parameters);
|
|
32
|
+
const formatTiles = new URL(props.data.tiles[0]).searchParams.get('formatTiles');
|
|
33
|
+
const mvt = formatTiles === 'mvt';
|
|
34
|
+
this.setState({ mvt });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
getLoadOptions() {
|
|
38
|
+
const loadOptions = super.getLoadOptions() || {};
|
|
39
|
+
const tileJSON = this.props.data;
|
|
40
|
+
injectAccessToken(loadOptions, tileJSON.accessToken);
|
|
41
|
+
loadOptions.gis = { format: 'binary' }; // Use binary for MVT loading
|
|
42
|
+
return loadOptions;
|
|
43
|
+
}
|
|
44
|
+
async getTileData(tile) {
|
|
45
|
+
const tileJSON = this.props.data;
|
|
46
|
+
const { tiles, properties_tiles } = tileJSON;
|
|
47
|
+
const url = _getURLFromTemplate(tiles, tile);
|
|
48
|
+
if (!url) {
|
|
49
|
+
return Promise.reject('Invalid URL');
|
|
50
|
+
}
|
|
51
|
+
const loadOptions = this.getLoadOptions();
|
|
52
|
+
const { fetch } = this.props;
|
|
53
|
+
const { signal } = tile;
|
|
54
|
+
// Fetch geometry and attributes separately
|
|
55
|
+
const geometryFetch = fetch(url, { propName: 'data', layer: this, loadOptions, signal });
|
|
56
|
+
if (!properties_tiles) {
|
|
57
|
+
return await geometryFetch;
|
|
58
|
+
}
|
|
59
|
+
const propertiesUrl = _getURLFromTemplate(properties_tiles, tile);
|
|
60
|
+
if (!propertiesUrl) {
|
|
61
|
+
return Promise.reject('Invalid properties URL');
|
|
62
|
+
}
|
|
63
|
+
const attributesFetch = fetch(propertiesUrl, {
|
|
64
|
+
propName: 'data',
|
|
65
|
+
layer: this,
|
|
66
|
+
loadOptions,
|
|
67
|
+
signal
|
|
68
|
+
});
|
|
69
|
+
const [geometry, attributes] = await Promise.all([geometryFetch, attributesFetch]);
|
|
70
|
+
if (!geometry)
|
|
71
|
+
return null;
|
|
72
|
+
return attributes ? mergeBoundaryData(geometry, attributes) : geometry;
|
|
73
|
+
}
|
|
74
|
+
renderSubLayers(props) {
|
|
75
|
+
if (props.data === null) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
if (this.state.mvt) {
|
|
79
|
+
return super.renderSubLayers(props);
|
|
80
|
+
}
|
|
81
|
+
const tileBbox = props.tile.bbox;
|
|
82
|
+
const { west, south, east, north } = tileBbox;
|
|
83
|
+
const subLayerProps = {
|
|
84
|
+
...props,
|
|
85
|
+
autoHighlight: false,
|
|
86
|
+
extensions: [new ClipExtension(), ...(props.extensions || [])],
|
|
87
|
+
clipBounds: [west, south, east, north]
|
|
88
|
+
};
|
|
89
|
+
const subLayer = new GeoJsonLayer(subLayerProps);
|
|
90
|
+
return subLayer;
|
|
91
|
+
}
|
|
92
|
+
getPickingInfo(params) {
|
|
93
|
+
const info = super.getPickingInfo(params);
|
|
94
|
+
if (this.state.binary && info.index !== -1) {
|
|
95
|
+
const { data } = params.sourceLayer.props;
|
|
96
|
+
info.object = binaryToGeojson(data, {
|
|
97
|
+
globalFeatureId: info.index
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return info;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MapType } from
|
|
2
|
-
import type { GeojsonResult, JsonResult, SourceOptionalOptions, SourceRequiredOptions, TilejsonResult } from
|
|
1
|
+
import type { MapType } from "../api/types.js";
|
|
2
|
+
import type { GeojsonResult, JsonResult, SourceOptionalOptions, SourceRequiredOptions, TilejsonResult } from "./types.js";
|
|
3
3
|
export declare const SOURCE_DEFAULTS: SourceOptionalOptions;
|
|
4
4
|
export declare function baseSource<UrlParameters extends Record<string, string>>(endpoint: MapType, options: Partial<SourceOptionalOptions> & SourceRequiredOptions, urlParameters: UrlParameters): Promise<TilejsonResult | GeojsonResult | JsonResult>;
|
|
5
5
|
//# sourceMappingURL=base-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-source.d.ts","sourceRoot":"","sources":["../../src/sources/base-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,OAAO,EAAC,wBAAqB;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EAErB,cAAc,EACf,mBAAgB;AAEjB,eAAO,MAAM,eAAe,EAAE,qBAK7B,CAAC;AAEF,wBAAsB,UAAU,CAAC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3E,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,EAC/D,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,cAAc,GAAG,aAAa,GAAG,UAAU,CAAC,CA6CtD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { DEFAULT_API_BASE_URL, DEFAULT_CLIENT } from "../api/common.js";
|
|
3
|
+
import { buildSourceUrl } from "../api/endpoints.js";
|
|
4
|
+
import { requestWithParameters } from "../api/request-with-parameters.js";
|
|
5
|
+
export const SOURCE_DEFAULTS = {
|
|
6
|
+
apiBaseUrl: DEFAULT_API_BASE_URL,
|
|
7
|
+
clientId: DEFAULT_CLIENT,
|
|
8
|
+
format: 'tilejson',
|
|
9
|
+
headers: {}
|
|
10
|
+
};
|
|
11
|
+
export async function baseSource(endpoint, options, urlParameters) {
|
|
12
|
+
const { accessToken, connectionName, cache, ...optionalOptions } = options;
|
|
13
|
+
const mergedOptions = { ...SOURCE_DEFAULTS, accessToken, connectionName, endpoint };
|
|
14
|
+
for (const key in optionalOptions) {
|
|
15
|
+
if (optionalOptions[key]) {
|
|
16
|
+
mergedOptions[key] = optionalOptions[key];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const baseUrl = buildSourceUrl(mergedOptions);
|
|
20
|
+
const { format } = mergedOptions;
|
|
21
|
+
const headers = { Authorization: `Bearer ${options.accessToken}`, ...options.headers };
|
|
22
|
+
const errorContext = {
|
|
23
|
+
requestType: 'Map instantiation',
|
|
24
|
+
connection: options.connectionName,
|
|
25
|
+
type: endpoint,
|
|
26
|
+
source: JSON.stringify(urlParameters, undefined, 2)
|
|
27
|
+
};
|
|
28
|
+
const mapInstantiation = await requestWithParameters({
|
|
29
|
+
baseUrl,
|
|
30
|
+
parameters: urlParameters,
|
|
31
|
+
headers,
|
|
32
|
+
errorContext
|
|
33
|
+
});
|
|
34
|
+
const dataUrl = mapInstantiation[format].url[0];
|
|
35
|
+
if (cache) {
|
|
36
|
+
cache.value = parseInt(new URL(dataUrl).searchParams.get('cache') || '', 10);
|
|
37
|
+
}
|
|
38
|
+
errorContext.requestType = 'Map data';
|
|
39
|
+
if (format === 'tilejson') {
|
|
40
|
+
return await requestWithParameters({
|
|
41
|
+
accessToken,
|
|
42
|
+
baseUrl: dataUrl,
|
|
43
|
+
headers,
|
|
44
|
+
errorContext
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return await requestWithParameters({
|
|
48
|
+
baseUrl: dataUrl,
|
|
49
|
+
headers,
|
|
50
|
+
errorContext
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QueryParameters } from "../api/index.js";
|
|
2
|
+
import type { FilterOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
3
|
+
export type BoundaryQuerySourceOptions = SourceOptions & FilterOptions & {
|
|
4
|
+
columns?: string[];
|
|
5
|
+
tilesetTableName: string;
|
|
6
|
+
matchingColumn?: string;
|
|
7
|
+
propertiesSqlQuery: string;
|
|
8
|
+
queryParameters?: QueryParameters;
|
|
9
|
+
};
|
|
10
|
+
export declare const boundaryQuerySource: (options: BoundaryQuerySourceOptions) => Promise<TilejsonResult>;
|
|
11
|
+
//# sourceMappingURL=boundary-query-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/boundary-query-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,wBAAqB;AAE7C,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAC,mBAAgB;AAE1E,MAAM,MAAM,0BAA0B,GAAG,aAAa,GACpD,aAAa,GAAG;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAUJ,eAAO,MAAM,mBAAmB,YACrB,0BAA0B,KAClC,QAAQ,cAAc,CAyBxB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { baseSource } from "./base-source.js";
|
|
2
|
+
export const boundaryQuerySource = async function (options) {
|
|
3
|
+
const { columns, filters, tilesetTableName, matchingColumn = 'id', propertiesSqlQuery, queryParameters } = options;
|
|
4
|
+
const urlParameters = {
|
|
5
|
+
tilesetTableName,
|
|
6
|
+
matchingColumn,
|
|
7
|
+
propertiesSqlQuery
|
|
8
|
+
};
|
|
9
|
+
if (columns) {
|
|
10
|
+
urlParameters.columns = columns.join(',');
|
|
11
|
+
}
|
|
12
|
+
if (filters) {
|
|
13
|
+
urlParameters.filters = JSON.stringify(filters);
|
|
14
|
+
}
|
|
15
|
+
if (queryParameters) {
|
|
16
|
+
urlParameters.queryParameters = JSON.stringify(queryParameters);
|
|
17
|
+
}
|
|
18
|
+
return baseSource('boundary', options, urlParameters);
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult } from
|
|
2
|
-
export type BoundaryTableSourceOptions = SourceOptions & {
|
|
1
|
+
import type { FilterOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
+
export type BoundaryTableSourceOptions = SourceOptions & FilterOptions & {
|
|
3
3
|
tilesetTableName: string;
|
|
4
4
|
columns?: string[];
|
|
5
5
|
matchingColumn?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/boundary-table-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAC,mBAAgB;AAE1E,MAAM,MAAM,0BAA0B,GAAG,aAAa,GACpD,aAAa,GAAG;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AASJ,eAAO,MAAM,mBAAmB,YACrB,0BAA0B,KAClC,QAAQ,cAAc,CAexB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { baseSource } from "./base-source.js";
|
|
2
|
+
export const boundaryTableSource = async function (options) {
|
|
3
|
+
const { filters, tilesetTableName, columns, matchingColumn = 'id', propertiesTableName } = options;
|
|
4
|
+
const urlParameters = {
|
|
5
|
+
tilesetTableName,
|
|
6
|
+
matchingColumn,
|
|
7
|
+
propertiesTableName
|
|
8
|
+
};
|
|
9
|
+
if (columns) {
|
|
10
|
+
urlParameters.columns = columns.join(',');
|
|
11
|
+
}
|
|
12
|
+
if (filters) {
|
|
13
|
+
urlParameters.filters = JSON.stringify(filters);
|
|
14
|
+
}
|
|
15
|
+
return baseSource('boundary', options, urlParameters);
|
|
16
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggregationOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from
|
|
1
|
+
import type { AggregationOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
2
|
export type H3QuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions;
|
|
3
3
|
export declare const h3QuerySource: (options: H3QuerySourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=h3-query-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h3-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,
|
|
1
|
+
{"version":3,"file":"h3-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAU3F,eAAO,MAAM,aAAa,YACf,oBAAoB,KAC5B,QAAQ,cAAc,CAsBxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const h3QuerySource = async function (options) {
|
|
4
|
+
const { aggregationExp, aggregationResLevel = 4, sqlQuery, spatialDataColumn = 'h3', queryParameters } = options;
|
|
5
|
+
const urlParameters = {
|
|
6
|
+
aggregationExp,
|
|
7
|
+
spatialDataColumn,
|
|
8
|
+
spatialDataType: 'h3',
|
|
9
|
+
q: sqlQuery
|
|
10
|
+
};
|
|
11
|
+
if (aggregationResLevel) {
|
|
12
|
+
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
13
|
+
}
|
|
14
|
+
if (queryParameters) {
|
|
15
|
+
urlParameters.queryParameters = JSON.stringify(queryParameters);
|
|
16
|
+
}
|
|
17
|
+
return baseSource('query', options, urlParameters);
|
|
18
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggregationOptions, SourceOptions, TableSourceOptions, TilejsonResult } from
|
|
1
|
+
import type { AggregationOptions, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
2
|
export type H3TableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions;
|
|
3
3
|
export declare const h3TableSource: (options: H3TableSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=h3-table-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h3-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,
|
|
1
|
+
{"version":3,"file":"h3-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAW3F,eAAO,MAAM,aAAa,YACf,oBAAoB,KAC5B,QAAQ,cAAc,CAsBxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const h3TableSource = async function (options) {
|
|
4
|
+
const { aggregationExp, aggregationResLevel = 4, columns, spatialDataColumn = 'h3', tableName } = options;
|
|
5
|
+
const urlParameters = {
|
|
6
|
+
aggregationExp,
|
|
7
|
+
name: tableName,
|
|
8
|
+
spatialDataColumn,
|
|
9
|
+
spatialDataType: 'h3'
|
|
10
|
+
};
|
|
11
|
+
if (aggregationResLevel) {
|
|
12
|
+
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
13
|
+
}
|
|
14
|
+
if (columns) {
|
|
15
|
+
urlParameters.columns = columns.join(',');
|
|
16
|
+
}
|
|
17
|
+
return baseSource('table', options, urlParameters);
|
|
18
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from
|
|
1
|
+
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
2
|
export type H3TilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
3
|
export declare const h3TilesetSource: (options: H3TilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=h3-tileset-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h3-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/h3-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEjF,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG1E,eAAO,MAAM,eAAe,YACjB,sBAAsB,KAC9B,QAAQ,cAAc,CAKxB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { SOURCE_DEFAULTS } from "./base-source.js";
|
|
2
|
+
export type { TilejsonResult, GeojsonResult, JsonResult } from "./types.js";
|
|
3
|
+
export { boundaryQuerySource } from "./boundary-query-source.js";
|
|
4
|
+
export type { BoundaryQuerySourceOptions } from "./boundary-query-source.js";
|
|
5
|
+
export { boundaryTableSource } from "./boundary-table-source.js";
|
|
6
|
+
export type { BoundaryTableSourceOptions } from "./boundary-table-source.js";
|
|
7
|
+
export { h3QuerySource } from "./h3-query-source.js";
|
|
8
|
+
export type { H3QuerySourceOptions } from "./h3-query-source.js";
|
|
9
|
+
export { h3TableSource } from "./h3-table-source.js";
|
|
10
|
+
export type { H3TableSourceOptions } from "./h3-table-source.js";
|
|
11
|
+
export { h3TilesetSource } from "./h3-tileset-source.js";
|
|
12
|
+
export type { H3TilesetSourceOptions } from "./h3-tileset-source.js";
|
|
13
|
+
export { rasterSource } from "./raster-source.js";
|
|
14
|
+
export type { RasterSourceOptions } from "./raster-source.js";
|
|
15
|
+
export { quadbinQuerySource } from "./quadbin-query-source.js";
|
|
16
|
+
export type { QuadbinQuerySourceOptions } from "./quadbin-query-source.js";
|
|
17
|
+
export { quadbinTableSource } from "./quadbin-table-source.js";
|
|
18
|
+
export type { QuadbinTableSourceOptions } from "./quadbin-table-source.js";
|
|
19
|
+
export { quadbinTilesetSource } from "./quadbin-tileset-source.js";
|
|
20
|
+
export type { QuadbinTilesetSourceOptions } from "./quadbin-tileset-source.js";
|
|
21
|
+
export { vectorQuerySource } from "./vector-query-source.js";
|
|
22
|
+
export type { VectorQuerySourceOptions } from "./vector-query-source.js";
|
|
23
|
+
export { vectorTableSource } from "./vector-table-source.js";
|
|
24
|
+
export type { VectorTableSourceOptions } from "./vector-table-source.js";
|
|
25
|
+
export { vectorTilesetSource } from "./vector-tileset-source.js";
|
|
26
|
+
export type { VectorTilesetSourceOptions } from "./vector-tileset-source.js";
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,yBAAsB;AAC9C,YAAY,EAAC,cAAc,EAAE,aAAa,EAAE,UAAU,EAAC,mBAAgB;AAEvE,OAAO,EAAC,mBAAmB,EAAC,mCAAgC;AAC5D,YAAY,EAAC,0BAA0B,EAAC,mCAAgC;AAExE,OAAO,EAAC,mBAAmB,EAAC,mCAAgC;AAC5D,YAAY,EAAC,0BAA0B,EAAC,mCAAgC;AAExE,OAAO,EAAC,aAAa,EAAC,6BAA0B;AAChD,YAAY,EAAC,oBAAoB,EAAC,6BAA0B;AAE5D,OAAO,EAAC,aAAa,EAAC,6BAA0B;AAChD,YAAY,EAAC,oBAAoB,EAAC,6BAA0B;AAE5D,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,YAAY,EAAC,sBAAsB,EAAC,+BAA4B;AAEhE,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,YAAY,EAAC,mBAAmB,EAAC,2BAAwB;AAEzD,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAC1D,YAAY,EAAC,yBAAyB,EAAC,kCAA+B;AAEtE,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAC1D,YAAY,EAAC,yBAAyB,EAAC,kCAA+B;AAEtE,OAAO,EAAC,oBAAoB,EAAC,oCAAiC;AAC9D,YAAY,EAAC,2BAA2B,EAAC,oCAAiC;AAE1E,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,YAAY,EAAC,wBAAwB,EAAC,iCAA8B;AAEpE,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,YAAY,EAAC,wBAAwB,EAAC,iCAA8B;AAEpE,OAAO,EAAC,mBAAmB,EAAC,mCAAgC;AAC5D,YAAY,EAAC,0BAA0B,EAAC,mCAAgC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { SOURCE_DEFAULTS } from "./base-source.js";
|
|
2
|
+
export { boundaryQuerySource } from "./boundary-query-source.js";
|
|
3
|
+
export { boundaryTableSource } from "./boundary-table-source.js";
|
|
4
|
+
export { h3QuerySource } from "./h3-query-source.js";
|
|
5
|
+
export { h3TableSource } from "./h3-table-source.js";
|
|
6
|
+
export { h3TilesetSource } from "./h3-tileset-source.js";
|
|
7
|
+
export { rasterSource } from "./raster-source.js";
|
|
8
|
+
export { quadbinQuerySource } from "./quadbin-query-source.js";
|
|
9
|
+
export { quadbinTableSource } from "./quadbin-table-source.js";
|
|
10
|
+
export { quadbinTilesetSource } from "./quadbin-tileset-source.js";
|
|
11
|
+
export { vectorQuerySource } from "./vector-query-source.js";
|
|
12
|
+
export { vectorTableSource } from "./vector-table-source.js";
|
|
13
|
+
export { vectorTilesetSource } from "./vector-tileset-source.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggregationOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from
|
|
1
|
+
import type { AggregationOptions, QuerySourceOptions, SourceOptions, TilejsonResult } from "./types.js";
|
|
2
2
|
export type QuadbinQuerySourceOptions = SourceOptions & QuerySourceOptions & AggregationOptions;
|
|
3
3
|
export declare const quadbinQuerySource: (options: QuadbinQuerySourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=quadbin-query-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,
|
|
1
|
+
{"version":3,"file":"quadbin-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EAEb,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAWhG,eAAO,MAAM,kBAAkB,YACpB,yBAAyB,KACjC,QAAQ,cAAc,CAsBxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const quadbinQuerySource = async function (options) {
|
|
4
|
+
const { aggregationExp, aggregationResLevel = 6, sqlQuery, spatialDataColumn = 'quadbin', queryParameters } = options;
|
|
5
|
+
const urlParameters = {
|
|
6
|
+
aggregationExp,
|
|
7
|
+
q: sqlQuery,
|
|
8
|
+
spatialDataColumn,
|
|
9
|
+
spatialDataType: 'quadbin'
|
|
10
|
+
};
|
|
11
|
+
if (aggregationResLevel) {
|
|
12
|
+
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
13
|
+
}
|
|
14
|
+
if (queryParameters) {
|
|
15
|
+
urlParameters.queryParameters = JSON.stringify(queryParameters);
|
|
16
|
+
}
|
|
17
|
+
return baseSource('query', options, urlParameters);
|
|
18
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggregationOptions, SourceOptions, TableSourceOptions, TilejsonResult } from
|
|
1
|
+
import type { AggregationOptions, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
2
|
export type QuadbinTableSourceOptions = SourceOptions & TableSourceOptions & AggregationOptions;
|
|
3
3
|
export declare const quadbinTableSource: (options: QuadbinTableSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=quadbin-table-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,
|
|
1
|
+
{"version":3,"file":"quadbin-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAWhG,eAAO,MAAM,kBAAkB,YACpB,yBAAyB,KACjC,QAAQ,cAAc,CAuBxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const quadbinTableSource = async function (options) {
|
|
4
|
+
const { aggregationExp, aggregationResLevel = 6, columns, spatialDataColumn = 'quadbin', tableName } = options;
|
|
5
|
+
const urlParameters = {
|
|
6
|
+
aggregationExp,
|
|
7
|
+
name: tableName,
|
|
8
|
+
spatialDataColumn,
|
|
9
|
+
spatialDataType: 'quadbin'
|
|
10
|
+
};
|
|
11
|
+
if (aggregationResLevel) {
|
|
12
|
+
urlParameters.aggregationResLevel = String(aggregationResLevel);
|
|
13
|
+
}
|
|
14
|
+
if (columns) {
|
|
15
|
+
urlParameters.columns = columns.join(',');
|
|
16
|
+
}
|
|
17
|
+
return baseSource('table', options, urlParameters);
|
|
18
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from
|
|
1
|
+
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
2
|
export type QuadbinTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
3
|
export declare const quadbinTilesetSource: (options: QuadbinTilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=quadbin-tileset-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quadbin-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,
|
|
1
|
+
{"version":3,"file":"quadbin-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/quadbin-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEjF,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG/E,eAAO,MAAM,oBAAoB,YACtB,2BAA2B,KACnC,QAAQ,cAAc,CAKxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from
|
|
1
|
+
import type { SourceOptions, TilejsonResult, TilesetSourceOptions } from "./types.js";
|
|
2
2
|
export type RasterSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
3
|
export declare const rasterSource: (options: RasterSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=raster-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raster-source.d.ts","sourceRoot":"","sources":["../../src/sources/raster-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAC,mBAAgB;AAEjF,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAGvE,eAAO,MAAM,YAAY,YAA4B,mBAAmB,KAAG,QAAQ,cAAc,CAKhG,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Feature } from 'geojson';
|
|
2
|
-
import type { Format, MapInstantiation, QueryParameters } from
|
|
2
|
+
import type { Filters, Format, MapInstantiation, QueryParameters } from "../api/types.js";
|
|
3
3
|
export type SourceRequiredOptions = {
|
|
4
4
|
/** Carto platform access token. */
|
|
5
5
|
accessToken: string;
|
|
@@ -49,6 +49,12 @@ export type AggregationOptions = {
|
|
|
49
49
|
*/
|
|
50
50
|
aggregationResLevel?: number;
|
|
51
51
|
};
|
|
52
|
+
export type FilterOptions = {
|
|
53
|
+
/**
|
|
54
|
+
* Filters to apply to the data source on the server
|
|
55
|
+
*/
|
|
56
|
+
filters: Filters;
|
|
57
|
+
};
|
|
52
58
|
export type QuerySourceOptions = {
|
|
53
59
|
/**
|
|
54
60
|
* The column name and the type of geospatial support.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sources/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FilterOptions, SourceOptions, QuerySourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
+
export type VectorQuerySourceOptions = SourceOptions & QuerySourceOptions & FilterOptions & {
|
|
3
|
+
columns?: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const vectorQuerySource: (options: VectorQuerySourceOptions) => Promise<TilejsonResult>;
|
|
6
|
+
//# sourceMappingURL=vector-query-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-query-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-query-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAElB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAClD,kBAAkB,GAClB,aAAa,GAAG;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAUJ,eAAO,MAAM,iBAAiB,YACnB,wBAAwB,KAChC,QAAQ,cAAc,CAcxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const vectorQuerySource = async function (options) {
|
|
4
|
+
const { columns, filters, spatialDataColumn = 'geom', sqlQuery, queryParameters } = options;
|
|
5
|
+
const urlParameters = { spatialDataColumn, spatialDataType: 'geo', q: sqlQuery };
|
|
6
|
+
if (columns) {
|
|
7
|
+
urlParameters.columns = columns.join(',');
|
|
8
|
+
}
|
|
9
|
+
if (filters) {
|
|
10
|
+
urlParameters.filters = JSON.stringify(filters);
|
|
11
|
+
}
|
|
12
|
+
if (queryParameters) {
|
|
13
|
+
urlParameters.queryParameters = JSON.stringify(queryParameters);
|
|
14
|
+
}
|
|
15
|
+
return baseSource('query', options, urlParameters);
|
|
16
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FilterOptions, SourceOptions, TableSourceOptions, TilejsonResult } from "./types.js";
|
|
2
|
+
export type VectorTableSourceOptions = SourceOptions & TableSourceOptions & FilterOptions;
|
|
3
|
+
export declare const vectorTableSource: (options: VectorTableSourceOptions) => Promise<TilejsonResult>;
|
|
4
|
+
//# sourceMappingURL=vector-table-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-table-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-table-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAEb,kBAAkB,EAClB,cAAc,EACf,mBAAgB;AAEjB,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,kBAAkB,GAAG,aAAa,CAAC;AAS1F,eAAO,MAAM,iBAAiB,YACnB,wBAAwB,KAChC,QAAQ,cAAc,CAWxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
2
|
+
import { baseSource } from "./base-source.js";
|
|
3
|
+
export const vectorTableSource = async function (options) {
|
|
4
|
+
const { columns, filters, spatialDataColumn = 'geom', tableName } = options;
|
|
5
|
+
const urlParameters = { name: tableName, spatialDataColumn, spatialDataType: 'geo' };
|
|
6
|
+
if (columns) {
|
|
7
|
+
urlParameters.columns = columns.join(',');
|
|
8
|
+
}
|
|
9
|
+
if (filters) {
|
|
10
|
+
urlParameters.filters = JSON.stringify(filters);
|
|
11
|
+
}
|
|
12
|
+
return baseSource('table', options, urlParameters);
|
|
13
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceOptions, TilesetSourceOptions, TilejsonResult } from
|
|
1
|
+
import type { SourceOptions, TilesetSourceOptions, TilejsonResult } from "./types.js";
|
|
2
2
|
export type VectorTilesetSourceOptions = SourceOptions & TilesetSourceOptions;
|
|
3
3
|
export declare const vectorTilesetSource: (options: VectorTilesetSourceOptions) => Promise<TilejsonResult>;
|
|
4
4
|
//# sourceMappingURL=vector-tileset-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAC,
|
|
1
|
+
{"version":3,"file":"vector-tileset-source.d.ts","sourceRoot":"","sources":["../../src/sources/vector-tileset-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAC,mBAAgB;AAEjF,MAAM,MAAM,0BAA0B,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAG9E,eAAO,MAAM,mBAAmB,YACrB,0BAA0B,KAClC,QAAQ,cAAc,CAKxB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccessorFunction } from '@deck.gl/core';
|
|
2
2
|
import { Feature } from 'geojson';
|
|
3
|
-
import { Color } from
|
|
4
|
-
import { AttributeSelector } from
|
|
3
|
+
import { Color } from "./palette.js";
|
|
4
|
+
import { AttributeSelector } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* Helper function for quickly creating a color bins style based on `d3` `scaleThreshold`.
|
|
7
7
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-bins-style.d.ts","sourceRoot":"","sources":["../../src/style/color-bins-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAmB,EAAC,KAAK,EAA8B,qBAAkB;AAEzE,OAAO,EAAC,iBAAiB,EAAe,mBAAgB;AAExD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,GAAG,OAAO,EAAE,EACjD,IAAI,EACJ,MAAM,EACN,MAAwB,EACxB,SAAsB,EACvB,EAAE;IACD,2CAA2C;IAC3C,IAAI,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAEvC,yDAAyD;IACzD,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,CAAC;IAE1B,uDAAuD;IACvD,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAWjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { scaleThreshold } from 'd3-scale';
|
|
2
|
+
import getPalette, { DEFAULT_PALETTE, NULL_COLOR } from "./palette.js";
|
|
3
|
+
import { assert } from "../utils.js";
|
|
4
|
+
import { getAttrValue } from "./utils.js";
|
|
5
|
+
/**
|
|
6
|
+
* Helper function for quickly creating a color bins style based on `d3` `scaleThreshold`.
|
|
7
|
+
*
|
|
8
|
+
* Data values of each attribute are rounded down to the nearest value in the domain and are then
|
|
9
|
+
* styled with the corresponding color.
|
|
10
|
+
*
|
|
11
|
+
* @return accessor that maps objects to `Color` values
|
|
12
|
+
*/
|
|
13
|
+
export default function colorBins({ attr, domain, colors = DEFAULT_PALETTE, nullColor = NULL_COLOR }) {
|
|
14
|
+
assert(Array.isArray(domain), 'Expected "domain" to be an array of numbers');
|
|
15
|
+
const palette = typeof colors === 'string' ? getPalette(colors, domain.length + 1) : colors;
|
|
16
|
+
const color = scaleThreshold().domain(domain).range(palette);
|
|
17
|
+
return d => {
|
|
18
|
+
const value = getAttrValue(attr, d);
|
|
19
|
+
return typeof value === 'number' && Number.isFinite(value) ? color(value) : nullColor;
|
|
20
|
+
};
|
|
21
|
+
}
|