bd-map-explorer
An open-source React map of Bangladesh on npm. Drill down from division to district, upazila and union, isolate any region, in Bangla or English.
- Year
- 2026
- Role
- Author and maintainer
- Context
- Published on npm
- Type
- Open source
- Stack
- React, Leaflet, GeoJSON, Vite, npm
bd-map-explorer/stack.json{"name": "bd-map-explorer","built_with": ["React","Leaflet","GeoJSON","Vite","npm"]}
npm install bd-map-explorer leaflet react-leaflet
Why
Bangladeshi apps that need a map of the country's administrative areas usually end up drawing their own boundaries or settling for a static image. I wanted a component you can drop in and use in five minutes.
What it does
- Four levels of drill-down: division → zila → upazila → union.
- Region isolation: focus on one area and hide everything else.
- Search for any area by name.
- Satellite and street tile layers.
- Bangla and English labels through a small i18n provider.
- An area picker and drawing tools for apps that need users to mark a location.
import 'leaflet/dist/leaflet.css';
import { MapExplorer, I18nProvider } from 'bd-map-explorer';
export default function Page() {
return (
<I18nProvider>
<MapExplorer />
</I18nProvider>
);
}
How it's built
A small monorepo: the library lives in packages/bd-map-explorer and is bundled with Vite in library mode (ESM and CommonJS), with a separate demo app that imports the source directly.
What I learned
Publishing a package taught me more about API design than any app did. Every prop name is a promise you have to keep.
Next project
CoWork API →