mapshot
mapshot copied to clipboard
Additional Layers
it would be really cool to have different layers that overlay on top of the main map, to display things like pollution and/or the power grid. Doing this should be relatively easy by just reading the respective data in lua, and emitting SVG files that leaflet could display, although you would have to look up the specifics yourself.
It would indeed be nice - it would be a great contribution :)
Fwiw, the API does indeed probably provides enough info:
- https://lua-api.factorio.com/latest/classes/LuaSurface.html#get_pollution is per chunk, so relatively low amount of data.
- For power grid, it depends on what would be displayed, but information is not lacking.
I would not export in SVG from the Lua mod, but just instead let the Lua code export the data itself (e.g., pollution per chunk) - and then let the javascript do the rendering in browser (whether it is SVG or something else). I suspect I one difficulty would be aligning things properly to the rendered image below.
[I have no plans to work on that for now]