@gisatcz/deckgl-geolib 1.11.0-dev.4 → 1.11.0-dev.6
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/cjs/index.js +8 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +4 -4
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/types/cogbitmaplayer/CogBitmapLayer.d.ts +1 -2
- package/dist/esm/index.js +8 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +3 -3
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/cogbitmaplayer/CogBitmapLayer.d.ts +1 -2
- package/package.json +1 -1
- package/src/cogbitmaplayer/CogBitmapLayer.ts +5 -6
- package/src/cogtiles/cogtiles.ts +5 -1
|
@@ -25,8 +25,6 @@ type _CogBitmapLayerProps = {
|
|
|
25
25
|
rasterData: URLTemplate;
|
|
26
26
|
/** Bounding box of the bitmap image, [minX, minY, maxX, maxY] in world coordinates. * */
|
|
27
27
|
bounds: Bounds | null;
|
|
28
|
-
/** Whether the rendered texture should be blurred or not - effects minFilter and maxFilter * */
|
|
29
|
-
blurredTexture?: boolean;
|
|
30
28
|
/** Weather visualise the entire image with specified opacity (0-1) * */
|
|
31
29
|
opacity?: number;
|
|
32
30
|
/** Whether the rendered texture should be clamped to terrain * */
|
|
@@ -51,6 +49,7 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
51
49
|
isTiled?: boolean;
|
|
52
50
|
terrain?: MeshAttributes;
|
|
53
51
|
zRange?: ZRange | null;
|
|
52
|
+
bitmapCogTiles: any;
|
|
54
53
|
};
|
|
55
54
|
initializeState(context: any): Promise<void>;
|
|
56
55
|
init(rasterUrl: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -119,9 +119,6 @@ type _CogBitmapLayerProps = {
|
|
|
119
119
|
/** Bounding box of the bitmap image, [minX, minY, maxX, maxY] in world coordinates. * */
|
|
120
120
|
bounds: Bounds | null;
|
|
121
121
|
|
|
122
|
-
/** Whether the rendered texture should be blurred or not - effects minFilter and maxFilter * */
|
|
123
|
-
blurredTexture?: boolean;
|
|
124
|
-
|
|
125
122
|
/** Weather visualise the entire image with specified opacity (0-1) * */
|
|
126
123
|
opacity?: number;
|
|
127
124
|
|
|
@@ -157,6 +154,7 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
157
154
|
isTiled?: boolean;
|
|
158
155
|
terrain?: MeshAttributes;
|
|
159
156
|
zRange?: ZRange | null;
|
|
157
|
+
bitmapCogTiles: any;
|
|
160
158
|
};
|
|
161
159
|
|
|
162
160
|
// private _isLoaded: boolean;
|
|
@@ -171,7 +169,6 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
171
169
|
//
|
|
172
170
|
// tileSize: number;
|
|
173
171
|
//
|
|
174
|
-
// blurredTexture: boolean;
|
|
175
172
|
|
|
176
173
|
async initializeState(context: any) {
|
|
177
174
|
super.initializeState(context);
|
|
@@ -265,8 +262,9 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
265
262
|
},
|
|
266
263
|
) {
|
|
267
264
|
const SubLayerClass = this.getSubLayerClass('image', BitmapLayer);
|
|
265
|
+
const { blurredTexture } = this.state.bitmapCogTiles.options;
|
|
268
266
|
|
|
269
|
-
const {
|
|
267
|
+
const { opacity, clampToTerrain } = this.props;
|
|
270
268
|
|
|
271
269
|
const { data } = props;
|
|
272
270
|
|
|
@@ -327,7 +325,8 @@ export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends Composi
|
|
|
327
325
|
clampToTerrain,
|
|
328
326
|
},
|
|
329
327
|
},
|
|
330
|
-
extent: this.state.bitmapCogTiles.cog
|
|
328
|
+
extent: this.state.bitmapCogTiles.cog
|
|
329
|
+
? this.state.bitmapCogTiles.getBoundsAsLatLon(this.state.bitmapCogTiles.cog) : null,
|
|
331
330
|
tileSize,
|
|
332
331
|
minZoom: this.minZoom,
|
|
333
332
|
maxZoom: this.maxZoom,
|
package/src/cogtiles/cogtiles.ts
CHANGED
|
@@ -17,6 +17,10 @@ export type Bounds = [minX: number, minY: number, maxX: number, maxY: number];
|
|
|
17
17
|
const EARTH_CIRCUMFERENCE = 40075000.0;
|
|
18
18
|
const EARTH_HALF_CIRCUMFERENCE = 20037500.0;
|
|
19
19
|
|
|
20
|
+
const CogTilesGeoImageOptionsDefaults = {
|
|
21
|
+
blurredTexture: true,
|
|
22
|
+
};
|
|
23
|
+
|
|
20
24
|
class CogTiles {
|
|
21
25
|
cog: Tiff;
|
|
22
26
|
|
|
@@ -37,7 +41,7 @@ class CogTiles {
|
|
|
37
41
|
options: GeoImageOptions;
|
|
38
42
|
|
|
39
43
|
constructor(options: GeoImageOptions) {
|
|
40
|
-
this.options = options;
|
|
44
|
+
this.options = { ...CogTilesGeoImageOptionsDefaults, ...options };
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
async initializeCog(url: string) {
|