I'm currently attempting browserification of Carto and mapnik-reference will have to change too to support it. Dynamic loading i.e. using require with variables is not supported in a browser context.
So we would have to move to requiring all versions explicitly. This has the obvious downside that all versions have to be loaded, which may not be necessary outside of a browser context. Another possibility would be to detect if being in a browser context (e.g. http://stackoverflow.com/a/31090240) and only then requiring all the versions.
I can provide a patch, but the general direction would have to be clarified first.
Thoughts?
I'm currently attempting browserification of Carto and mapnik-reference will have to change too to support it. Dynamic loading i.e. using require with variables is not supported in a browser context.
So we would have to move to requiring all versions explicitly. This has the obvious downside that all versions have to be loaded, which may not be necessary outside of a browser context. Another possibility would be to detect if being in a browser context (e.g. http://stackoverflow.com/a/31090240) and only then requiring all the versions.
I can provide a patch, but the general direction would have to be clarified first.
Thoughts?