Skip to content

Commit

Permalink
fix: remove console & update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hongfaqiu committed Jan 12, 2024
1 parent 056eb42 commit 7c6dcae
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
23 changes: 22 additions & 1 deletion packages/TIFFImageryProvider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
});
```

Custom colors

```ts
TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
renderOptions: {
single: {
"colors": [
[1, "rgb(154, 206, 127)"],
[2, "rgb(163, 214, 245)"],
[3, "rgb(255, 251, 177)"],
[4, "rgb(193, 114, 97)"],
[5, "rgb(220, 100, 120)"],
[6, "rgb(49, 173, 105)"]
],
type: "discrete",
useRealValue: true // use real value in colors stops
}
}
});
```

## API

```ts
Expand Down Expand Up @@ -253,7 +274,7 @@ type ColorScaleNames = 'viridis' | 'inferno' | 'turbo' | 'rainbow' | 'jet' | 'hs

## Demo

[online Demo](https://tiff-imagery-provider-example.vercel.app/)
[online Demo](https://tiff-imagery-provider.opendde.com/?panel=layer)

- Powered by [Next.js](https://github.com/vercel/next.js).
- Dark mode with [Semi-UI](<https://github.com/DouyinFE/semi-design>).
Expand Down
23 changes: 22 additions & 1 deletion packages/TIFFImageryProvider/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
});
```

自定义色带

```ts
TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
renderOptions: {
single: {
"colors": [
[1, "rgb(154, 206, 127)"],
[2, "rgb(163, 214, 245)"],
[3, "rgb(255, 251, 177)"],
[4, "rgb(193, 114, 97)"],
[5, "rgb(220, 100, 120)"],
[6, "rgb(49, 173, 105)"]
],
type: "discrete",
useRealValue: true // 使用tiff真实值作为色带的控制点
}
}
});
```

## API

```ts
Expand Down Expand Up @@ -251,7 +272,7 @@ type ColorScaleNames = 'viridis' | 'inferno' | 'turbo' | 'rainbow' | 'jet' | 'hs

## 示例

[在线示例](https://tiff-imagery-provider-example.vercel.app/)
[在线示例](https://tiff-imagery-provider.opendde.com/?panel=layer)

- 使用 [Next.js](https://github.com/vercel/next.js) 搭建。
- 使用 [Semi-UI](<https://github.com/DouyinFE/semi-design>) 实现暗黑模式。
Expand Down
2 changes: 1 addition & 1 deletion packages/TIFFImageryProvider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
"tslib": "^2.5.0",
"typescript": "4.8.4"
},
"gitHead": "11e0518939adc2d6699c9817b05f2c3d5dcb1cc7"
"gitHead": "056eb423ac4dee49acdae834c413869db9a47e9a"
}
1 change: 0 additions & 1 deletion packages/TIFFImageryProvider/src/TIFFImageryProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ export class TIFFImageryProvider {
numberOfLevelZeroTilesY: 1
});
} else if (typeof this._proj?.project === 'function' && typeof this._proj?.unproject === 'function') {
console.log("bbox", this.bbox);
console.warn(`[Experimental] Reprojection EPSG:${prjCode}`)
this.tilingScheme = new TIFFImageryProviderTilingScheme({
rectangleNortheastInMeters: new Cartesian2(east, north),
Expand Down

0 comments on commit 7c6dcae

Please sign in to comment.