An extensible next.js starter kit archived with the leaflet-react map plugin. Template visually enhanced by tailwind and lucide icons. ✨ Setup with typescript 👐.
Packed with useful components and hooks for using the map and create UI elements for next(.js) mapping projects.
- Features
- Getting started
- Start up
- Coming up (probably)
- Remove / change linting rules
- WebGL?
- No typescript?
- 🏇 next.js 15 ("pages" routing)
- 😏 typescript + strict lint setup
- 🐛 custom markers
- 📄 custom popups
- 📚 marker categories
- 🫧 marker clustering
- ⚓️ context for map and leaflet instances
- 🏡 custom ui components (locate me, center on markers)
In Version v0.1.2 I changed the path aliases to be more consistent with the ES standards from @alias
to #alias
. If pulling the template from v0.1.1 you have to change the import paths in your components and pages.
- import { SomeComponent } from '@components/useMap'
+ import { SomeComponent } from '#components/useMap'
Create new Github repo with vercel and deploy it within minutes. Could not be easier as hitting some buttons. Shipping of private repos is possible.
Later: Check out your repo locally and run npm install
or yarn
in root
Follow Instructions for Starting Up
git clone https://github.com/richard-unterberg/next-leaflet-starter-typescript
# then
npm install
# or
yarn
According the official Next.js Docs:
Run the development server:
npm run dev
# or
yarn dev
Building with type checking and linting
npm run build
# or
yarn build
Start build locally
npm run start
# or
yarn start
- redesign zoom in / zoom out
- atom components for map ui
- fix error when setting new coordinates in hot reload "Map container is already initialized."
- breakpoint hook synced with tailwind breakpoint which is usable in js
- multiple map instances per page
- add some data & experiments with more data
- Feel free to contribute! 🤗
You can adjust the settings mainly in eslint.json
and tsconfig.json
.
I've been using them a lot on my dayjob and I can't be anymore without them. 🥲
leafleft, graphic-based tile rendering or rasterized zoom levels are not smooth enough and you are in for crazy fast WebGL mapping? Here's my maplibre next.js ts starter kit
See this nice javascript implementation - This repo is inspired by: https://github.com/colbyfayock/next-leaflet-starter
Happy coding! ✌️👽