@gisatcz/deckgl-geolib 1.11.0-dev.1 → 1.11.0-dev.2
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 +283 -51
- 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 +56 -37
- package/dist/esm/index.js +283 -51
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +4 -4
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/cogbitmaplayer/CogBitmapLayer.d.ts +56 -37
- package/package.json +1 -1
- package/src/cogbitmaplayer/CogBitmapLayer.ts +435 -79
|
@@ -1,42 +1,61 @@
|
|
|
1
|
-
import { CompositeLayer } from '@deck.gl/core';
|
|
2
|
-
import {
|
|
1
|
+
import { CompositeLayer, CompositeLayerProps, DefaultProps, Layer, LayersList, TextureSource, UpdateParameters } from '@deck.gl/core';
|
|
2
|
+
import { TileLayerProps, GeoBoundingBox, _TileLoadProps as TileLoadProps, _Tile2DHeader as Tile2DHeader, NonGeoBoundingBox } from '@deck.gl/geo-layers';
|
|
3
3
|
import { BitmapLayer } from '@deck.gl/layers';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import type { MeshAttributes } from '@loaders.gl/schema';
|
|
5
|
+
export type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;
|
|
6
|
+
export type ZRange = [minZ: number, maxZ: number];
|
|
7
|
+
export type Bounds = [minX: number, minY: number, maxX: number, maxY: number];
|
|
8
|
+
export type URLTemplate = string | string[] | null;
|
|
9
|
+
export declare const urlType: {
|
|
10
|
+
type: "object";
|
|
11
|
+
value: URLTemplate;
|
|
12
|
+
validate: (value: any, propType: any) => boolean;
|
|
13
|
+
equal: (value1: any, value2: any) => boolean;
|
|
14
|
+
};
|
|
15
|
+
type MeshAndTexture = [MeshAttributes | null, TextureSource | null];
|
|
16
|
+
/** All properties supported by CogBitmapLayer */
|
|
17
|
+
export type CogBitmapLayerProps = _CogBitmapLayerProps & TileLayerProps<MeshAndTexture> & CompositeLayerProps;
|
|
18
|
+
/** Props added by the CogBitmapLayer */
|
|
19
|
+
type _CogBitmapLayerProps = {
|
|
20
|
+
/** Image url that encodes raster data. * */
|
|
21
|
+
rasterData: URLTemplate;
|
|
22
|
+
/** Bounding box of the bitmap image, [minX, minY, maxX, maxY] in world coordinates. * */
|
|
23
|
+
bounds: Bounds | null;
|
|
24
|
+
/** Whether the rendered texture should be blurred or not - effects minFilter and maxFilter * */
|
|
25
|
+
blurredTexture?: boolean;
|
|
26
|
+
/** Whether the rendered texture should be clamped to terrain * */
|
|
27
|
+
clampToTerrain?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* TODO
|
|
30
|
+
*/
|
|
31
|
+
cogBitmapOptions: Object;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `loadOptions.terrain.workerUrl` instead
|
|
34
|
+
*/
|
|
35
|
+
workerUrl?: string;
|
|
36
|
+
};
|
|
37
|
+
/** Render bitmap texture from cog raster images. */
|
|
38
|
+
export default class CogBitmapLayer<ExtraPropsT extends {} = {}> extends CompositeLayer<ExtraPropsT & Required<_CogBitmapLayerProps & Required<TileLayerProps<MeshAndTexture>>>> {
|
|
39
|
+
static defaultProps: DefaultProps<CogBitmapLayerProps>;
|
|
8
40
|
static layerName: string;
|
|
9
|
-
|
|
10
|
-
url: string;
|
|
11
|
-
static displayName: string;
|
|
12
|
-
cogTiles: CogTiles;
|
|
13
|
-
tileSize: number;
|
|
41
|
+
rasterUrl: string;
|
|
14
42
|
minZoom: number;
|
|
15
43
|
maxZoom: number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
bounds: [any, any, any, any];
|
|
33
|
-
opacity: number;
|
|
34
|
-
textureParameters: {
|
|
35
|
-
minFilter: "linear" | "nearest";
|
|
36
|
-
magFilter: "linear" | "nearest";
|
|
37
|
-
};
|
|
38
|
-
extensions: TerrainExtension[];
|
|
39
|
-
}>;
|
|
40
|
-
}>;
|
|
44
|
+
state: {
|
|
45
|
+
isTiled?: boolean;
|
|
46
|
+
terrain?: MeshAttributes;
|
|
47
|
+
zRange?: ZRange | null;
|
|
48
|
+
};
|
|
49
|
+
initializeState(context: any): Promise<void>;
|
|
50
|
+
init(rasterUrl: string): Promise<void>;
|
|
51
|
+
updateState({ props, oldProps }: UpdateParameters<this>): void;
|
|
52
|
+
getTiledBitmapData(tile: TileLoadProps): Promise<TextureSource>;
|
|
53
|
+
renderSubLayers(props: TileLayerProps<TextureSource> & {
|
|
54
|
+
id: string;
|
|
55
|
+
data: TextureSource;
|
|
56
|
+
tile: Tile2DHeader<TextureSource>;
|
|
57
|
+
}): BitmapLayer<{}>;
|
|
58
|
+
onViewportLoad(tiles?: Tile2DHeader<MeshAndTexture>[]): void;
|
|
59
|
+
renderLayers(): Layer | null | LayersList;
|
|
41
60
|
}
|
|
42
|
-
export
|
|
61
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CompositeLayer, log, COORDINATE_SYSTEM } from '@deck.gl/core';
|
|
2
2
|
import { TileLayer } from '@deck.gl/geo-layers';
|
|
3
3
|
import { BitmapLayer } from '@deck.gl/layers';
|
|
4
|
-
import { _TerrainExtension } from '@deck.gl/extensions';
|
|
5
4
|
import chroma from 'chroma-js';
|
|
6
5
|
import { getMeshBoundingBox } from '@loaders.gl/schema';
|
|
7
6
|
import { concatenateTypedArrays } from '@loaders.gl/loader-utils';
|
|
@@ -15467,68 +15466,301 @@ class CogTiles {
|
|
|
15467
15466
|
}
|
|
15468
15467
|
}
|
|
15469
15468
|
|
|
15470
|
-
|
|
15471
|
-
|
|
15469
|
+
const urlType$1 = {
|
|
15470
|
+
type: 'object',
|
|
15471
|
+
value: null,
|
|
15472
|
+
validate: (value, propType) => (propType.optional && value === null)
|
|
15473
|
+
|| typeof value === 'string'
|
|
15474
|
+
|| (Array.isArray(value) && value.every((url) => typeof url === 'string')),
|
|
15475
|
+
equal: (value1, value2) => {
|
|
15476
|
+
if (value1 === value2) {
|
|
15477
|
+
return true;
|
|
15478
|
+
}
|
|
15479
|
+
if (!Array.isArray(value1) || !Array.isArray(value2)) {
|
|
15480
|
+
return false;
|
|
15481
|
+
}
|
|
15482
|
+
const len = value1.length;
|
|
15483
|
+
if (len !== value2.length) {
|
|
15484
|
+
return false;
|
|
15485
|
+
}
|
|
15486
|
+
for (let i = 0; i < len; i++) {
|
|
15487
|
+
if (value1[i] !== value2[i]) {
|
|
15488
|
+
return false;
|
|
15489
|
+
}
|
|
15490
|
+
}
|
|
15491
|
+
return true;
|
|
15492
|
+
},
|
|
15493
|
+
};
|
|
15494
|
+
const DUMMY_DATA$1 = [1];
|
|
15495
|
+
const defaultProps$1 = Object.assign(Object.assign({}, TileLayer.defaultProps), {
|
|
15496
|
+
// Image url that encodes height data
|
|
15497
|
+
// elevationData: urlType,
|
|
15498
|
+
// Image url to use as texture
|
|
15499
|
+
// texture: { ...urlType, optional: true },
|
|
15500
|
+
// Martini error tolerance in meters, smaller number -> more detailed mesh
|
|
15501
|
+
// meshMaxError: { type: 'number', value: 4.0 },
|
|
15502
|
+
// Bounding box of the terrain image, [minX, minY, maxX, maxY] in world coordinates
|
|
15503
|
+
bounds: {
|
|
15504
|
+
type: 'array', value: null, optional: true, compare: true,
|
|
15505
|
+
}, rasterData: urlType$1,
|
|
15506
|
+
// Color to use if texture is unavailable
|
|
15507
|
+
// color: { type: 'color', value: [255, 255, 255] },
|
|
15508
|
+
blurredTexture: true, clampToTerrain: true,
|
|
15509
|
+
// Object to decode height data, from (r, g, b) to height in meters
|
|
15510
|
+
// elevationDecoder: {
|
|
15511
|
+
// type: 'object',
|
|
15512
|
+
// value: {
|
|
15513
|
+
// rScaler: 1,
|
|
15514
|
+
// gScaler: 0,
|
|
15515
|
+
// bScaler: 0,
|
|
15516
|
+
// offset: 0,
|
|
15517
|
+
// },
|
|
15518
|
+
// },
|
|
15519
|
+
// Supply url to local terrain worker bundle. Only required if running offline and cannot access CDN.
|
|
15520
|
+
workerUrl: '' });
|
|
15521
|
+
// Turns array of templates into a single string to work around shallow change
|
|
15522
|
+
function urlTemplateToUpdateTrigger$1(template) {
|
|
15523
|
+
if (Array.isArray(template)) {
|
|
15524
|
+
return template.join(';');
|
|
15525
|
+
}
|
|
15526
|
+
return template || '';
|
|
15527
|
+
}
|
|
15528
|
+
/** Render bitmap texture from cog raster images. */
|
|
15472
15529
|
class CogBitmapLayer extends CompositeLayer {
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15481
|
-
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
|
|
15486
|
-
// this.init(url);
|
|
15487
|
-
// }, 500);
|
|
15488
|
-
}
|
|
15489
|
-
initializeState() {
|
|
15490
|
-
this.state = {
|
|
15491
|
-
initialized: false,
|
|
15492
|
-
};
|
|
15493
|
-
this.init(this.url);
|
|
15494
|
-
}
|
|
15495
|
-
init(url) {
|
|
15530
|
+
// private _isLoaded: boolean;
|
|
15531
|
+
// id = '';
|
|
15532
|
+
// url: string;
|
|
15533
|
+
// static displayName: string;
|
|
15534
|
+
// cogTiles: CogTiles;
|
|
15535
|
+
//
|
|
15536
|
+
// tileSize: number;
|
|
15537
|
+
//
|
|
15538
|
+
// blurredTexture: boolean;
|
|
15539
|
+
initializeState(context) {
|
|
15540
|
+
const _super = Object.create(null, {
|
|
15541
|
+
initializeState: { get: () => super.initializeState }
|
|
15542
|
+
});
|
|
15496
15543
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15497
|
-
|
|
15498
|
-
this.setState({
|
|
15499
|
-
|
|
15500
|
-
|
|
15544
|
+
_super.initializeState.call(this, context);
|
|
15545
|
+
this.setState({
|
|
15546
|
+
bitmapCogTiles: new CogTiles(this.props.cogBitmapOptions),
|
|
15547
|
+
initialized: false,
|
|
15548
|
+
});
|
|
15549
|
+
yield this.init(this.rasterUrl);
|
|
15550
|
+
});
|
|
15551
|
+
}
|
|
15552
|
+
init(rasterUrl) {
|
|
15553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15554
|
+
const cog = yield this.state.bitmapCogTiles.initializeCog(this.props.rasterData);
|
|
15555
|
+
// this.tileSize = this.terrainCogTiles.getTileSize(cog);
|
|
15556
|
+
const zoomRange = this.state.bitmapCogTiles.getZoomRange(cog);
|
|
15501
15557
|
[this.minZoom, this.maxZoom] = zoomRange;
|
|
15558
|
+
console.log(cog);
|
|
15559
|
+
this.setState({ initialized: true });
|
|
15502
15560
|
});
|
|
15503
15561
|
}
|
|
15562
|
+
updateState({ props, oldProps }) {
|
|
15563
|
+
const rasterDataChanged = props.rasterData !== oldProps.rasterData;
|
|
15564
|
+
if (rasterDataChanged) {
|
|
15565
|
+
const { rasterData } = props;
|
|
15566
|
+
const isTiled = rasterData
|
|
15567
|
+
&& (Array.isArray(rasterData)
|
|
15568
|
+
|| (rasterData.includes('{x}') && rasterData.includes('{y}'))) || this.props.isTiled;
|
|
15569
|
+
this.setState({ isTiled });
|
|
15570
|
+
}
|
|
15571
|
+
// Reloading for single terrain mesh
|
|
15572
|
+
const shouldReload = rasterDataChanged
|
|
15573
|
+
// || props.meshMaxError !== oldProps.meshMaxError
|
|
15574
|
+
// || props.elevationDecoder !== oldProps.elevationDecoder
|
|
15575
|
+
|| props.bounds !== oldProps.bounds;
|
|
15576
|
+
if (!this.state.isTiled && shouldReload) ;
|
|
15577
|
+
// TODO - remove in v9
|
|
15578
|
+
// @ts-ignore
|
|
15579
|
+
if (props.workerUrl) {
|
|
15580
|
+
log.removed('workerUrl', 'loadOptions.terrain.workerUrl')();
|
|
15581
|
+
}
|
|
15582
|
+
}
|
|
15583
|
+
getTiledBitmapData(tile) {
|
|
15584
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15585
|
+
console.log('getTiledBitmapData');
|
|
15586
|
+
this.props;
|
|
15587
|
+
const { viewport } = this.context;
|
|
15588
|
+
let bottomLeft = [0, 0];
|
|
15589
|
+
let topRight = [0, 0];
|
|
15590
|
+
if (viewport.isGeospatial) {
|
|
15591
|
+
const bbox = tile.bbox;
|
|
15592
|
+
bottomLeft = viewport.projectFlat([bbox.west, bbox.south]);
|
|
15593
|
+
topRight = viewport.projectFlat([bbox.east, bbox.north]);
|
|
15594
|
+
}
|
|
15595
|
+
else {
|
|
15596
|
+
const bbox = tile.bbox;
|
|
15597
|
+
bottomLeft = [bbox.left, bbox.bottom];
|
|
15598
|
+
topRight = [bbox.right, bbox.top];
|
|
15599
|
+
}
|
|
15600
|
+
const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
|
|
15601
|
+
// TODO - pass signal to getTile
|
|
15602
|
+
// abort request if signal is aborted
|
|
15603
|
+
const cogBitmap = yield this.state.bitmapCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds);
|
|
15604
|
+
return Promise.all([cogBitmap]);
|
|
15605
|
+
});
|
|
15606
|
+
}
|
|
15607
|
+
renderSubLayers(props) {
|
|
15608
|
+
console.log('rendering sub layer and consoling props');
|
|
15609
|
+
const SubLayerClass = this.getSubLayerClass('image', BitmapLayer);
|
|
15610
|
+
// const { color } = this.props;
|
|
15611
|
+
console.log(this.props);
|
|
15612
|
+
const { bounds, blurredTexture, clampToTerrain } = this.props;
|
|
15613
|
+
const { data } = props;
|
|
15614
|
+
if (!data) {
|
|
15615
|
+
return null;
|
|
15616
|
+
}
|
|
15617
|
+
// const [raster, texture] = data;
|
|
15618
|
+
const [image] = data;
|
|
15619
|
+
const { bbox: { west, south, east, north, }, } = props.tile;
|
|
15620
|
+
return new SubLayerClass(Object.assign(Object.assign({}, props), { tileSize: 256 }), {
|
|
15621
|
+
data: DUMMY_DATA$1,
|
|
15622
|
+
// data: null,
|
|
15623
|
+
image,
|
|
15624
|
+
// texture,
|
|
15625
|
+
_instanced: false,
|
|
15626
|
+
// coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
|
|
15627
|
+
// getPosition: (d) => [0, 0, 0],
|
|
15628
|
+
bounds: [west, south, east, north],
|
|
15629
|
+
// bounds,
|
|
15630
|
+
opacity: 1,
|
|
15631
|
+
textureParameters: {
|
|
15632
|
+
minFilter: blurredTexture ? 'linear' : 'nearest',
|
|
15633
|
+
magFilter: blurredTexture ? 'linear' : 'nearest',
|
|
15634
|
+
},
|
|
15635
|
+
// extensions: this.cogTiles?.options?.clampToTerrain ? [new TerrainExtension()] : [],
|
|
15636
|
+
// ...(this.cogTiles?.options?.clampToTerrain?.terrainDrawMode
|
|
15637
|
+
// ? { terrainDrawMode: this.cogTiles?.options?.clampToTerrain.terrainDrawMode }
|
|
15638
|
+
// : {}),
|
|
15639
|
+
});
|
|
15640
|
+
}
|
|
15641
|
+
// Update zRange of viewport
|
|
15642
|
+
onViewportLoad(tiles) {
|
|
15643
|
+
if (!tiles) {
|
|
15644
|
+
return;
|
|
15645
|
+
}
|
|
15646
|
+
const { zRange } = this.state;
|
|
15647
|
+
const ranges = tiles
|
|
15648
|
+
.map((tile) => tile.content)
|
|
15649
|
+
.filter((x) => x && x[0])
|
|
15650
|
+
.map((arr) => {
|
|
15651
|
+
var _a, _b;
|
|
15652
|
+
// @ts-ignore
|
|
15653
|
+
const bounds = (_b = (_a = arr[0]) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.boundingBox;
|
|
15654
|
+
return bounds === null || bounds === void 0 ? void 0 : bounds.map((bound) => bound[2]);
|
|
15655
|
+
});
|
|
15656
|
+
if (ranges.length === 0) {
|
|
15657
|
+
return;
|
|
15658
|
+
}
|
|
15659
|
+
const minZ = Math.min(...ranges.map((x) => x[0]));
|
|
15660
|
+
const maxZ = Math.max(...ranges.map((x) => x[1]));
|
|
15661
|
+
if (!zRange || minZ < zRange[0] || maxZ > zRange[1]) {
|
|
15662
|
+
this.setState({ zRange: [Number.isFinite(minZ) ? minZ : 0, Number.isFinite(maxZ) ? maxZ : 0] });
|
|
15663
|
+
}
|
|
15664
|
+
}
|
|
15665
|
+
// constructor(id:string, url:string, options:GeoImageOptions) {
|
|
15666
|
+
// super({});
|
|
15667
|
+
// this.id = id;
|
|
15668
|
+
// // this.state = {
|
|
15669
|
+
// // initialized: false,
|
|
15670
|
+
// // };
|
|
15671
|
+
// // this._isLoaded = false;
|
|
15672
|
+
// this.cogTiles = new CogTiles(options);
|
|
15673
|
+
// this.blurredTexture = options.blurredTexture;
|
|
15674
|
+
// this.url = url;
|
|
15675
|
+
// // setTimeout(() => {
|
|
15676
|
+
// // this.init(url);
|
|
15677
|
+
// // }, 500);
|
|
15678
|
+
// }
|
|
15679
|
+
//
|
|
15680
|
+
// initializeState() {
|
|
15681
|
+
// this.state = {
|
|
15682
|
+
// initialized: false,
|
|
15683
|
+
// };
|
|
15684
|
+
//
|
|
15685
|
+
// this.init(this.url);
|
|
15686
|
+
// }
|
|
15687
|
+
//
|
|
15688
|
+
// async init(url:string) {
|
|
15689
|
+
// const cog = await this.cogTiles.initializeCog(url);
|
|
15690
|
+
// this.setState({ initialized: true });
|
|
15691
|
+
// this.tileSize = this.cogTiles.getTileSize(cog);
|
|
15692
|
+
// const zoomRange = this.cogTiles.getZoomRange(cog);
|
|
15693
|
+
// [this.minZoom, this.maxZoom] = zoomRange;
|
|
15694
|
+
// }
|
|
15695
|
+
//
|
|
15504
15696
|
renderLayers() {
|
|
15505
|
-
|
|
15506
|
-
|
|
15507
|
-
|
|
15508
|
-
|
|
15509
|
-
|
|
15510
|
-
|
|
15511
|
-
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15515
|
-
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
|
|
15520
|
-
|
|
15521
|
-
|
|
15522
|
-
|
|
15697
|
+
const { rasterData, blurredTexture, clampToTerrain, tileSize, maxZoom, minZoom, extent, maxRequests, onTileLoad, onTileUnload, onTileError, maxCacheSize, maxCacheByteSize, refinementStrategy, } = this.props;
|
|
15698
|
+
console.log('render bitmap layers');
|
|
15699
|
+
// console.log(this.state);
|
|
15700
|
+
if (this.state.isTiled && this.state.initialized) {
|
|
15701
|
+
console.log('start rendering tile layer');
|
|
15702
|
+
return new TileLayer(this.getSubLayerProps({
|
|
15703
|
+
id: 'tiles',
|
|
15704
|
+
}), {
|
|
15705
|
+
getTileData: this.getTiledBitmapData.bind(this),
|
|
15706
|
+
// getTileData: (tileData: any) => this.state.bitmapCogTiles.getTile(
|
|
15707
|
+
// tileData.index.x,
|
|
15708
|
+
// tileData.index.y,
|
|
15709
|
+
// tileData.index.z,
|
|
15710
|
+
// ),
|
|
15711
|
+
renderSubLayers: this.renderSubLayers.bind(this),
|
|
15712
|
+
// renderSubLayers: (props: any) => {
|
|
15713
|
+
// const {
|
|
15714
|
+
// bbox: {
|
|
15715
|
+
// west, south, east, north,
|
|
15716
|
+
// },
|
|
15717
|
+
// } = props.tile;
|
|
15718
|
+
// // MK proc to tady funguje jen s 0?
|
|
15719
|
+
// console.log(props.data[0]);
|
|
15720
|
+
// return new BitmapLayer(props, {
|
|
15721
|
+
// data: DUMMY_DATA,
|
|
15722
|
+
// image: props.data[0],
|
|
15723
|
+
// bounds: [west, south, east, north],
|
|
15724
|
+
// opacity: 1, // 0.6
|
|
15725
|
+
// textureParameters: {
|
|
15726
|
+
// minFilter: blurredTexture ? 'linear' : 'nearest',
|
|
15727
|
+
// magFilter: blurredTexture ? 'linear' : 'nearest',
|
|
15728
|
+
// },
|
|
15729
|
+
// // extensions: this.cogTiles?.options?.clampToTerrain ? [new TerrainExtension()] : [],
|
|
15730
|
+
// // ...(this.cogTiles?.options?.clampToTerrain?.terrainDrawMode
|
|
15731
|
+
// // ? { terrainDrawMode: this.cogTiles?.options?.clampToTerrain.terrainDrawMode }
|
|
15732
|
+
// // : {}),
|
|
15733
|
+
// });
|
|
15734
|
+
// },
|
|
15735
|
+
updateTriggers: {
|
|
15736
|
+
getTileData: {
|
|
15737
|
+
rasterData: urlTemplateToUpdateTrigger$1(rasterData),
|
|
15738
|
+
blurredTexture,
|
|
15739
|
+
clampToTerrain,
|
|
15740
|
+
// texture: urlTemplateToUpdateTrigger(texture),
|
|
15741
|
+
// meshMaxError,
|
|
15742
|
+
// elevationDecoder,
|
|
15743
|
+
},
|
|
15523
15744
|
},
|
|
15745
|
+
onViewportLoad: this.onViewportLoad.bind(this),
|
|
15746
|
+
zRange: this.state.zRange || null,
|
|
15747
|
+
tileSize,
|
|
15748
|
+
maxZoom,
|
|
15749
|
+
minZoom,
|
|
15750
|
+
extent,
|
|
15751
|
+
maxRequests,
|
|
15752
|
+
onTileLoad,
|
|
15753
|
+
onTileUnload,
|
|
15754
|
+
onTileError,
|
|
15755
|
+
maxCacheSize,
|
|
15756
|
+
maxCacheByteSize,
|
|
15757
|
+
refinementStrategy,
|
|
15524
15758
|
});
|
|
15525
|
-
return layer;
|
|
15526
15759
|
}
|
|
15527
|
-
return null;
|
|
15528
15760
|
}
|
|
15529
15761
|
}
|
|
15762
|
+
CogBitmapLayer.defaultProps = defaultProps$1;
|
|
15530
15763
|
CogBitmapLayer.layerName = 'CogBitmapLayer';
|
|
15531
|
-
CogBitmapLayer.displayName = 'CogBitmapLayer';
|
|
15532
15764
|
|
|
15533
15765
|
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
|
|
15534
15766
|
//
|