CloudMade/Leaflet — Issue #356: Export Leaflet as a module for server-side use
Author: mephistho
Created: 2011-10-31 10:21:45+00:00
State: open

Hi,
related to a short twitter-conversation, now this issue:
I would like to use Leaflet server-sided with nodejs like this:

var leafletjs = require('./dist/leaflet.js');

I'd like to do some data-processing server-sided and the transfer Layer-Objects depending on certain parameters on demand to the client.

On twitter you said, I can't use leafletjs with nodejs at this state, because "Leaflet doesn't export itself as a module, and it's easy to fix,[...]".

Server-side use might not make sense for everyone straight away, but as it is, I have to try a few things server-sided.

If it's really easy to fix, could you provide a workaround or at least tell me which pieces of your code to look at?

Many thanks in advance,
Andreas