deckgl-typings icon indicating copy to clipboard operation
deckgl-typings copied to clipboard

TileLayer.getTileData doesn't match the documentation

Open andreasg123 opened this issue 4 years ago • 1 comments

Thanks for creating these typings. They are very useful for calling deck.gl from TypeScript.

In getTileData, tile.signal is missing. Also, tile.url should be optional because it is added internally: https://github.com/danmarshall/deckgl-typings/blob/master/deck.gl__geo-layers/index.d.ts#L220

Documentation: https://deck.gl/docs/api-reference/geo-layers/tile-layer#gettiledata

Usage in the code: https://github.com/visgl/deck.gl/blob/8.3-release/modules/geo-layers/src/tile-layer/tile-2d-header.js#L70 https://github.com/visgl/deck.gl/blob/8.3-release/modules/geo-layers/src/tile-layer/tile-layer.js#L160

andreasg123 avatar Jan 07 '21 20:01 andreasg123

Also, the TileLayer constructor should really use rest syntax because multiple property objects could be used: https://deck.gl/docs/api-reference/core/layer#constructor-1

andreasg123 avatar Jan 07 '21 20:01 andreasg123