Skip to content

fix: preserve panchayat_boundaries style#352

Open
Athina09 wants to merge 1 commit intocore-stack-org:developmentfrom
Athina09:bugfix/panchayat-style-override
Open

fix: preserve panchayat_boundaries style#352
Athina09 wants to merge 1 commit intocore-stack-org:developmentfrom
Athina09:bugfix/panchayat-style-override

Conversation

@Athina09
Copy link

Summary

Fixes a style override bug in getVectorLayers where the custom panchayat_boundaries style was being immediately replaced by the generic default style.

Problem

In src/actions/getVectorLayers.js, the code first applies:

  • PanchayatBoundariesStyle when layer_store === "panchayat_boundaries"

But right after that, it always applies a generic style:

  • black stroke + blue fill

This unconditional second setStyle(...) overwrote the panchayat-specific style.

Fix

Updated style assignment logic to be conditional:

  • If layer_store === "panchayat_boundaries", keep PanchayatBoundariesStyle.
  • Otherwise, apply the generic default style.

Impact

  • Panchayat boundaries now render with their intended visual style.
  • Other vector layers continue to use the existing default style.
  • Restores expected map readability and layer-specific styling behavior.

File changed

  • src/actions/getVectorLayers.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant