A server component for server-rendering leaflet maps
How to use this component
This component statically renders a map. It uses the client-side Leaflet library, running entirely inside a Domino-based server-side DOM, serving up the rendered HTML output.
To use it, install it from NPM with
npm install leaflet-map-server-component and just render:
Don't have server components set up yet? Take a look in demo.js for a working example of the whole setup.
Want to see it in action right now? Clone this repo and run
npm install && npm run dev to start the server and see the result.
- Map shape overlays
- Magically autoresize the map when rendering