Skip to content

fix: migrate cultural map from Leaflet to MapLibre#21

Open
ANSHU-SACHDEV wants to merge 1 commit into
Pri-21-coder:mainfrom
ANSHU-SACHDEV:feature/map-multilanguage-support
Open

fix: migrate cultural map from Leaflet to MapLibre#21
ANSHU-SACHDEV wants to merge 1 commit into
Pri-21-coder:mainfrom
ANSHU-SACHDEV:feature/map-multilanguage-support

Conversation

@ANSHU-SACHDEV
Copy link
Copy Markdown
Contributor

📌 Related Issue

Fixes: #12


##my changes

This PR enhances the Cultural Map feature by migrating the map implementation from Leaflet to MapLibre GL JS and improving multilingual support.

Changes Made

  • Migrated map rendering from Leaflet to MapLibre GL JS.
  • Added dynamic language switching for map labels (English, Hindi, and Marathi).
  • Implemented setMapLanguage() to update map labels without reloading the map.
  • Added a backend /api/map-style endpoint to securely serve MapTiler styles.
  • Removed exposure of the MapTiler API key from frontend code.
  • Fixed village marker rendering and click interactions.
  • Fixed cultural item marker rendering on the map.
  • Updated heatmap functionality to work with MapLibre markers.
  • Improved map initialization and style loading handling.

Result

Users can now seamlessly switch between English, Hindi, and Marathi map labels while keeping all village markers, cultural markers, and map interactions functional.


📷 Screenshots

image image

🧪 Checklist

  • I have tested my changes locally.
  • I have followed the project's code style and guidelines.
  • I have added necessary comments and documentation.
  • The code compiles and runs without errors.

create your own api_key at maptiler cloud and add that in .env and run the server

Program:

SSOC 2026


🗒️ Additional Notes

  • Marathi labels now gracefully fall back to Hindi or English when Marathi labels are unavailable.
  • MapTiler API key is no longer exposed in frontend source code.
  • Existing village information panels and multilingual content continue to work as expected.

Thank you for contributing!

@Pri-21-coder
Copy link
Copy Markdown
Owner

@ANSHU-SACHDEV Please resolve the merge conflict

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support localized map labels based on selected language

2 participants