Skip to content

fix(hillshade): mix-blend-mode sometimes not applied at closest zoom on topo layer #168

@jasoneplumb

Description

@jasoneplumb

Symptoms

When viewing the Topographic basemap with Hillshade enabled, the multiply blend sometimes doesn't apply at the closest zoom levels — the hillshade overlay appears to drop out or render without blending.

Likely cause

mix-blend-mode: multiply is applied to the Leaflet tile-layer container (.leaflet-layer). That container is the parent of .leaflet-tile-container which Leaflet animates with transform: translate3d(...) for hardware acceleration. During zoom transitions, the transformed child can establish its own stacking context, isolating the blend from the base-layer sibling intermittently — especially noticeable at the highest zoom levels where Esri's hillshade is upscaled from its z=16 native ceiling.

Fix

Apply mix-blend-mode at the tile-image level (.hillshade-blend img.leaflet-tile) so each tile blends individually with the base map. Tile images are direct visual content — they sit underneath the transform-driven container animation but render in the parent pane's stacking context, which avoids the isolation issue.

Acceptance

  • Hillshade visibly blends with topo at every zoom level, including the maximum
  • No regression on the streets / cyclosm / humanitarian basemaps
  • npm run type-check && npm run lint && npm test clean

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important — fix this cycleUXUser experience improvementsbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions