@deck.gl/geo-layers 9.3.3 → 9.3.5
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/dist/dist.dev.js +1795 -1792
- package/dist/index.cjs +15 -13
- package/dist/index.cjs.map +2 -2
- package/dist/terrain-layer/terrain-layer.d.ts.map +1 -1
- package/dist/terrain-layer/terrain-layer.js +8 -6
- package/dist/terrain-layer/terrain-layer.js.map +1 -1
- package/dist.min.js +18 -18
- package/package.json +11 -11
- package/src/terrain-layer/terrain-layer.ts +10 -5
package/dist/index.cjs
CHANGED
|
@@ -2643,7 +2643,6 @@ function getMeshGeometry(contentAttributes) {
|
|
|
2643
2643
|
// dist/terrain-layer/terrain-layer.js
|
|
2644
2644
|
var import_core13 = require("@deck.gl/core");
|
|
2645
2645
|
var import_mesh_layers3 = require("@deck.gl/mesh-layers");
|
|
2646
|
-
var import_core14 = require("@deck.gl/core");
|
|
2647
2646
|
var import_terrain = require("@loaders.gl/terrain");
|
|
2648
2647
|
var DUMMY_DATA = [1];
|
|
2649
2648
|
var defaultProps13 = {
|
|
@@ -2760,7 +2759,7 @@ var TerrainLayer = class extends import_core13.CompositeLayer {
|
|
|
2760
2759
|
mesh,
|
|
2761
2760
|
texture,
|
|
2762
2761
|
_instanced: false,
|
|
2763
|
-
coordinateSystem:
|
|
2762
|
+
coordinateSystem: import_core13.COORDINATE_SYSTEM.CARTESIAN,
|
|
2764
2763
|
getPosition: (d) => [0, 0, 0],
|
|
2765
2764
|
getColor: color,
|
|
2766
2765
|
wireframe,
|
|
@@ -2787,7 +2786,7 @@ var TerrainLayer = class extends import_core13.CompositeLayer {
|
|
|
2787
2786
|
}
|
|
2788
2787
|
}
|
|
2789
2788
|
renderLayers() {
|
|
2790
|
-
const { color, material, elevationData, texture, wireframe, meshMaxError, elevationDecoder, tileSize, maxZoom, minZoom, extent, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy } = this.props;
|
|
2789
|
+
const { color, material, elevationData, texture, wireframe, meshMaxError, elevationDecoder, tileSize, maxZoom, minZoom, extent, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, zoomOffset } = this.props;
|
|
2791
2790
|
if (this.state.isTiled) {
|
|
2792
2791
|
return new tile_layer_default(this.getSubLayerProps({
|
|
2793
2792
|
id: "tiles"
|
|
@@ -2799,7 +2798,9 @@ var TerrainLayer = class extends import_core13.CompositeLayer {
|
|
|
2799
2798
|
elevationData: urlTemplateToUpdateTrigger(elevationData),
|
|
2800
2799
|
texture: urlTemplateToUpdateTrigger(texture),
|
|
2801
2800
|
meshMaxError,
|
|
2802
|
-
elevationDecoder
|
|
2801
|
+
elevationDecoder,
|
|
2802
|
+
projectionMode: this.context.viewport.projectionMode,
|
|
2803
|
+
zoomOffset
|
|
2803
2804
|
}
|
|
2804
2805
|
},
|
|
2805
2806
|
onViewportLoad: this.onViewportLoad.bind(this),
|
|
@@ -2814,7 +2815,8 @@ var TerrainLayer = class extends import_core13.CompositeLayer {
|
|
|
2814
2815
|
onTileError,
|
|
2815
2816
|
maxCacheSize,
|
|
2816
2817
|
maxCacheByteSize,
|
|
2817
|
-
refinementStrategy
|
|
2818
|
+
refinementStrategy,
|
|
2819
|
+
zoomOffset
|
|
2818
2820
|
});
|
|
2819
2821
|
}
|
|
2820
2822
|
if (!elevationData) {
|
|
@@ -2841,15 +2843,15 @@ var terrain_layer_default = TerrainLayer;
|
|
|
2841
2843
|
var isTileSetURL = (url) => url.includes("{x}") && (url.includes("{y}") || url.includes("{-y}"));
|
|
2842
2844
|
|
|
2843
2845
|
// dist/mvt-layer/mvt-layer.js
|
|
2844
|
-
var
|
|
2846
|
+
var import_core15 = require("@deck.gl/core");
|
|
2845
2847
|
var import_layers8 = require("@deck.gl/layers");
|
|
2846
2848
|
var import_extensions = require("@deck.gl/extensions");
|
|
2847
|
-
var
|
|
2849
|
+
var import_core16 = require("@math.gl/core");
|
|
2848
2850
|
var import_mvt = require("@loaders.gl/mvt");
|
|
2849
2851
|
var import_gis = require("@loaders.gl/gis");
|
|
2850
2852
|
|
|
2851
2853
|
// dist/mvt-layer/coordinate-transform.js
|
|
2852
|
-
var
|
|
2854
|
+
var import_core14 = require("@math.gl/core");
|
|
2853
2855
|
var availableTransformations = {
|
|
2854
2856
|
Point,
|
|
2855
2857
|
MultiPoint,
|
|
@@ -2859,8 +2861,8 @@ var availableTransformations = {
|
|
|
2859
2861
|
MultiPolygon
|
|
2860
2862
|
};
|
|
2861
2863
|
function Point([pointX, pointY], [nw, se], viewport) {
|
|
2862
|
-
const x = (0,
|
|
2863
|
-
const y = (0,
|
|
2864
|
+
const x = (0, import_core14.lerp)(nw[0], se[0], pointX);
|
|
2865
|
+
const y = (0, import_core14.lerp)(nw[1], se[1], pointY);
|
|
2864
2866
|
return viewport.unprojectFlat([x, y]);
|
|
2865
2867
|
}
|
|
2866
2868
|
function getPoints(geometry, bbox, viewport) {
|
|
@@ -3088,17 +3090,17 @@ var MVTLayer = class extends tile_layer_default {
|
|
|
3088
3090
|
const yScale = -xScale;
|
|
3089
3091
|
const xOffset = WORLD_SIZE * x / worldScale;
|
|
3090
3092
|
const yOffset = WORLD_SIZE * (1 - y / worldScale);
|
|
3091
|
-
const modelMatrix = new
|
|
3093
|
+
const modelMatrix = new import_core16.Matrix4().scale([xScale, yScale, 1]);
|
|
3092
3094
|
props.autoHighlight = false;
|
|
3093
3095
|
if (!this.context.viewport.resolution) {
|
|
3094
3096
|
props.modelMatrix = modelMatrix;
|
|
3095
3097
|
props.coordinateOrigin = [xOffset, yOffset, 0];
|
|
3096
|
-
props.coordinateSystem =
|
|
3098
|
+
props.coordinateSystem = import_core15.COORDINATE_SYSTEM.CARTESIAN;
|
|
3097
3099
|
props.extensions = [...props.extensions || [], new import_extensions.ClipExtension()];
|
|
3098
3100
|
}
|
|
3099
3101
|
const subLayers = super.renderSubLayers(props);
|
|
3100
3102
|
if (this.state.binary && !(subLayers instanceof import_layers8.GeoJsonLayer)) {
|
|
3101
|
-
|
|
3103
|
+
import_core15.log.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")();
|
|
3102
3104
|
}
|
|
3103
3105
|
return subLayers;
|
|
3104
3106
|
}
|