Mapshot

by palats

Generates a zoomable render of the whole map.

Utilities
22 days ago
1.0 - 1.1
3.61K

b Not working HTML

11 months ago
(updated 11 months ago)

Hello, i am not pro in websites but generated file not work. In web console:
Access to fetch at 'file:///C:/Users/germa/AppData/Roaming/Factorio/script-output/mapshot/1/d-f58e6281/mapshot.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, isolated-app, ipns, https, chrome-untrusted, ipfs, data, chrome-extension, chrome.
d-f58e6281/mapshot.json:1 Failed to load resource: net::ERR_FAILED
viewer-57a67e6e.js:1 Uncaught (in promise) TypeError: Failed to fetch
at h (viewer-57a67e6e.js:1:14397)
at viewer-57a67e6e.js:1:17084
at viewer-57a67e6e.js:1:17090

10 months ago

Hello! Unfortunately this is a security restriction with modern browsers, where opening directly a file (using file://) does not allow for that file to load other resources (such as .json) easily. You need to have some form of a webserver to access the content. I'm really not familiar with Windows to give any good recommendation, but here are the main options:

  • You can try the binary that comes with Mapshot, see https://github.com/Palats/mapshot#serving-the-maps for the details . In practice, if you get the mapshot .exe file (https://github.com/Palats/mapshot/releases/download/0.0.17/mapshot-windows.exe) and just launch it, it should start the serving mode. It is a bit fragile, so I'm not sure if still works. Also, running a binary that some random person on the internet told you to download is not always a good idea :)
  • You can find a web server for windows, there are multiple options. In that case you want to look for something to serve "static content", which is usually the simplest case.
  • Or you can upload that to some web hosting service if you have access to such thing - but Mapshot generated content is quite large, so that's usually non trivial.
10 months ago

Thanks^_^

New response