Skip to content

[Bug]: panchayat_boundaries style gets overridden in getVectorLayers #351

@Athina09

Description

@Athina09

Page / Route

Homepage (/)

Selected Location

No response

Bug Description

Description

In src/actions/getVectorLayers.js, the layer-specific style for panchayat_boundaries is set first, but then immediately overwritten by a generic default style.
Current flow:

  1. If layer_store === "panchayat_boundaries", code runs:
    • wmsLayer.setStyle(PanchayatBoundariesStyle);
  2. Right after that, code always runs:
    • wmsLayer.setStyle((feature) => new Style(...default blue fill...));
      Because of this, the custom panchayat style is never actually applied.

Expected Behavior

When layer_store is panchayat_boundaries, the layer should keep PanchayatBoundariesStyle (transparent fill + intended boundary stroke), and should not be overridden by the generic style.

Actual Behavior

panchayat_boundaries is rendered with the generic blue-filled style, not with PanchayatBoundariesStyle.

Impact

  • Wrong visual styling for panchayat boundaries.
  • Reduced map readability and inconsistency with intended layer design.

Suggested Fix

Apply the generic style only for non-panchayat_boundaries layers, e.g. use else:

  • if (layer_store === "panchayat_boundaries") { ... } else { ...default style... }

File

  • src/actions/getVectorLayers.js

Steps to Reproduce

No response

Expected Behavior

No response

Filters Applied

No response

Screenshots / Logs

No response

Browser

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions