Skip to content

geotiff: COGLayer opacity prop does not get passed to underlying RasterLayer #325

Closed

Description

@em843

I've noticed that setting the opacity prop in the COGLayer definition does not do anything:

// The rendered layer will have opacity = 1
const hillshadeLayer = new COGLayer({
    id: 'hillshade-layer',
    geotiff: `${LOCAL_URL}/my-hillshade.tif`,
    opacity: 0.2,
  });

But if I manually pass this.props.opacity to the internal RasterLayer construction, it works:

  layers.push(new RasterLayer({
                id: `${props.id}-raster`,
                width,
                height,
                opacity: this.props.opacity,
                renderPipeline: renderTile(data),
// ... etc

This probably affects the other valid Layer props as well besides width and height.

Activity

  1. changed the title [-]COGLayer: opacity prop does not get passed to underlying RasterLayer[/-] [+]geotiff: COGLayer opacity prop does not get passed to underlying RasterLayer[/+] on Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions