Train Simulator Classic 2024

Train Simulator Classic 2024

Not enough ratings
Satellite image overlay workaround with a node.js proxy tool
By cartoren
This guide gives specific steps to use the tool described in this forum post as a workaround for the Google Maps overlay in TS route editor since July 2018.
   
Award
Favorite
Favorited
Unfavorite
Step 0. Configure the running environment for the tool
Download and install https://nodejs.org/en/. Make sure you can run `node --version` and `npm` in your command prompt successfully. If not, you may want to add the directory of your node.js installation to your environment variable PATH.
Step 1. Get a copy of the tool and install its dependencies
Download and unzip the tool[github.com] to any directory you like. In file explorer, press Shift and click Right Mouse Button then select open command window here. Run `npm install` to install several packages needed for network connection and image manipulation.
Step 2. Run the tool scripts
In the same command window, run `node app.js`. This starts a local server to listen relevant map requests and handle them in a way without a valid API credential. It also serves a small file (`gmaps.pac`) indicating which requests are relevant, and this will be used through the next step.
Step 3. Configure network proxy for your system
TS retrieves Google Maps tiles in a specific way, which is intercepted, identified and handled by this tool in another working way. So you have to change proxy settings of your computer. On Windows 7, this can be found in your control panel by searching proxy, or the settings menu (gear button) in your IE. In the connection tab, select LAN settings. Then set the address of proxy to be http://127.0.0.1:6789/pac.txt which is served by the tool to redirect the tile requests from TS to the tool.
Step 4. Check in your editor
It should be working now regardless whether or not the API key you entered in the TS settings are valid.
This is a test screenshot from Penisula Corridor packed with TS2018. It shows that the satellite image is consistent with the route, confirming the correctness of the tool.
Note: Proxy settings
If you use another proxy to access Internet or Google services (mainly because your network admin or gov't blocks your access to them), you should configure this tool to make Internet connections via your proxy. This should be done before Step 2 by modifying and saving the proxy string in line 11 of `app.js` script with a text editor. If you didn't do that before it, you should terminate the tool by pressing Ctrl+C in the command window where it's running.
24 Comments
ShiftGear [NL] 20 Apr, 2024 @ 12:06pm 
I am back :-)

I have a new pc, so i installed everything again on it include the Node version: 8.11.3 but, i dont get the google images in TrainSimulator ( TS ).
My old pc has no problems till this day.
After some npm reinstall i get the following message: npm WARN trainsim-map-proxy@0.0.1 No repository field
Do i missed something here again, is it windows 10 that sucks? or do i have to change my proxy settings?

Kind regards

Erwin.
RailworksAmerica 28 Jan, 2024 @ 3:13pm 
Does not work
wolfpredator 25 Nov, 2022 @ 1:51am 
I would REALLY like to use this program but...

1) Where do I install nodejs?
2) Where do I install the tool?

In the readme file all the tool states is run 'nbm install' WHAT?! I don't see 'nbm install' anywhere within the nodejs archive. Otherwise I wouldn't be here posting

Please help!
mirekbrnosim 29 Apr, 2020 @ 6:10am 
> images@3.0.1 install E:\node\node_modules\images
> node ./scripts/install.js

Downloading binary from https://github.com/zhangyuanwei/node-images/releases/download/v3.0.1/win32-x64-72_binding.node
Cannot download "https://github.com/zhangyuanwei/node-images/releases/download/v3.0.1/win32-x64-72_binding.node" :

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

npm config set proxy http://example.com:8080
added 145 packages in 8.394s
mirekbrnosim 29 Apr, 2020 @ 6:09am 
E:\node>npm install
E:\node\mime -> E:\node\node_modules\mime\cli.js
E:\node\mkdirp -> E:\node\node_modules\mkdirp\bin\cmd.js
E:\node\nopt -> E:\node\node_modules\nopt\bin\nopt.js
E:\node\semver -> E:\node\node_modules\semver\bin\semver
E:\node\sshpk-conv -> E:\node\node_modules\sshpk\bin\sshpk-conv
E:\node\sshpk-verify -> E:\node\node_modules\sshpk\bin\sshpk-verify
E:\node\sshpk-sign -> E:\node\node_modules\sshpk\bin\sshpk-sign
E:\node\uuid -> E:\node\node_modules\uuid\bin\uuid
E:\node\which -> E:\node\node_modules\which\bin\which
E:\node\rimraf -> E:\node\node_modules\rimraf\bin.js
E:\node\node-gyp -> E:\node\node_modules\node-gyp\bin\node-gyp.js
cartoren  [author] 22 Nov, 2019 @ 9:26pm 
Hi Alle, I don't think you need a proxy for npm install. What's exactly the thing that prevented you from downloading dependency? Or what is the error message?
[IT/RD] AlleE652Brennero 22 Nov, 2019 @ 8:36pm 
I can't download from the command prompt "npm install", do I already need a proxy to download everything?
vapappap 2 Aug, 2019 @ 7:18pm 
How do you get this to work? Is there a manual for this? If So please text or email it to me. Text is best having a problem lately.
ShiftGear [NL] 28 Jul, 2019 @ 8:50am 
I finally got it working, after downgrade Node to 8.11.3 it worked!
However it doesn't work with 1280 x 1280, only 640 x 640, but that's fine to me!
Again thanks for this solution!
cartoren  [author] 19 Jul, 2019 @ 8:41am 
Erwin, actually your node version is too high, according to release notes [github.com]. The dependency when I wrote this tool was node (v8.11.3) and library images (v3.0.1). You may try install a node js at lower version and/or upgrading images to latest (delete package-lock.json and run npm install again) if you really need it.