L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
122 stars 22 forks source link

Initial display position/scale of multi-surface #107

Closed spiralpower closed 2 years ago

spiralpower commented 2 years ago

Hi, I used FacotorioMaps for the first time the other day, in Space-Exploration, with multiple surfaces. The command was executed for each surface. When I open index.html, I can select surfaces, but the display position and scale after selection do not match the existing chunks, making it difficult to find them. Can this be improved?

It is a 3GB file, but it was output by FactorioMaps. https://drive.google.com/file/d/11sniLBcrtk7gOByOh4AgfUDw-sn5inCN/view

L0laapk3 commented 2 years ago

What do you mean by this? I'll check out your files tomorrow.

Note that to get all the surfaces into a single snapshot, you can use the --surface argument multiple times in a single command.

If the complaint is that the physical location of stuff on all the surfaces is different, this is something that the space-exploration dev can address by implementing the factoriomaps api.

spiralpower commented 2 years ago

The fact that I ran the command multiple times is simply the means I took, it is the position/scale that I want to address this time. The question is whether FactorioMaps can properly set the initial display position/scale of each surface in FactorioMaps.

L0laapk3 commented 2 years ago

Hi, currently it cannot, but I would be more than happy to provide an API endpoint to allow setting a surface offset x/y/zoom.

spiralpower commented 2 years ago

I see, thank you for your reply. I thought it would be possible to do this by referring to the maximum and minimum x,y coordinates of the chunks that exist on each surface, starting at the middle of the x,y coordinates, and scaling according to the difference between the maximum and minimum coordinates. Sorry, I haven't read the code.