L0laapk3 / FactorioMaps

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

How to use with old factorio maps? #30

Closed fireduck64 closed 5 years ago

fireduck64 commented 5 years ago

I have a bunch of old maps that I saved with earlier versions of FactorioMaps. They used the Google Maps API and now don't work (even if I put in a valid API key).

It appears that the new version doesn't use Google Maps but I'm guessing still uses the same image format and layout. Is there a way to generate a new index and library files and mapInfo.js for an old map?

Note: many of these maps were from factorio versions and mod packages that would be hard to reproduce so I can't use the new process and go from save to map.

fireduck64 commented 5 years ago

Anyone else facing my problems: 1) Add an API key. 2) Change code to not do a url change on every recenter. See: https://storage.googleapis.com/factorio-1209k-maps/Vista/index.html

Notice that I changed: map.addListener('center_changed', checkBounds); to map.addListener('center_changed', update_map);

fireduck64 commented 5 years ago

There was a related issue: https://github.com/xkjyeah/vue-google-maps/issues/330

L0laapk3 commented 5 years ago

The reason I started working on my own version of factoriomaps is because the old version had a whole list of annoyances. Converting the old maps isn't supported by me, however however if you're not afraid to tinker a bit with python, I can give you a list of what needs to happen to make it work:

If I'm not mistaking, those steps should allow you to 'convert' your old maps. Good luck! :P

L0laapk3 commented 5 years ago

Feel free to reopen if you have anymore questions.