Dev Tutorial [Editor] Aerial Imagery (2 Viewers)

To aid with building highly-accurate real maps, the OMSI 2 Editor can display aerial imagery onto tiles so that the map can be built with everything aligned correctly. For the aerial imagery to work, your map must be using real-world coordinates.

The first step to using Aerial Imagery is to go into /OMSI 2/maps/ and create a directory called aerials. The editor will not create this directory automatically and instead just fail to download any imagery.

Next we need to tell OMSI where to look online to find the aerial imagery. To do this, you need to edit /OMSI 2/options.cfg. Right at the bottom of the file is the tag:
Code:
[Editor_LinkAerial]
Directly under it a link should exist for the site that distributes the aerial images that will be downloaded, but by default it is not set. There are several links available that work here, the easiest to start with is OpenStreetMap imagery:
Code:
http://b.tile.openstreetmap.org/~z/~x/~y.png
Paste this directly below the tag, save the file and then load the Editor. To display the images in the Editor, go to the Tile tab and check the "Use tile aerials" option:
upload_2016-9-17_14-46-15.png
The resolution of the above link is limited to 256px, so leave the slider alone and click "Dnl. current Tile". This will download a JPEG image into the directory you created earlier and apply it to the tile you're on. Additionally, any tiles that have not yet been downloaded will display the most recently downloaded image. As the images are stored locally on your computer, they will now appear each time the tile aerials are activated without having to redownload them. It's also possible to change the link after downloading some images and then download some other tiles with a different mapping style if you want to mix mapping types.

On the subject of changing the link, you'll probably find that the 256px streetmap imagery leaves rather a lot to be desired in terms of detail, but luckily there are alternatives provided by GCMods:
Code:
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&apicode=YourBingAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&type=road&apicode=YourBingAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&hres=1&apicode=YourGoogleAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&apicode=YourGoogleAPICode
http://aerial.gcmods.de/toquad.php?x=~x&y=~y&z=~z&service=google&type=roadmap&apicode=YourGoogleAPICode

These links give Aerial and Streetmap imagery from Bing and Google, but they don't work unless you provide an API code.

To get an API code to use the Bing imagery, you'll need to go to the Bing Maps Dev Center and sign in with a Microsoft account. Then, go to the My Keys section and create a new Basic/Not-For-Profit key. This will give you a key which you can paste in place of YourBingAPICode in the links above.

To get an API code to use the Google imagery, you'll need to create a Google Maps Static API key, which requires a Google Cloud Platform account, which requires a Debit/Credit card as requests to the API are pay-as-you-go. You get $300 credit with your free trial, which is enough for over 2,000 tiles at max resolution, so it's only really an issue if you are but a child. This will give you a key which you can paste in place of YourGoogleAPICode in the links above.

With the exception of the first Google link, imagery can then be downloaded up to 2048px square. For higher resolutions, the game will appear to freeze for quite some time while the image is downloaded. Google imagery is usually much higher quality and more recent that Bing imagery, however it has a watermark on each 256px square. The first Google link is slightly strange as it only works at the 256px setting, but actually downloads a 512px image with only the one watermark rather than the usual 4...
 
Last edited:

Hullian111

EYMS Buses Really Mean Business
Aug 5, 2017
910
5
1,722
... well, where do you think?!
So I've bung mine into the map editor, using the real-world co-ords... however, I'm having a few issues.
  1. The directory it was made in was 'NewMap', and now, the tiles only load in that. Do I have to use that, now, or can I change it back?
  2. On the 'NewMap' directory, I've got four tiles that are exactly the same. What exactly have I done wrong? Disregard, solved by making a new tile.
 

Advertisement

Advertisement

hi @ strada-hog123 I have a problem, I don't understand why this tile is white, but in other places the tile loads well so I don't understand please help me.

PS: if you don't understand my English well because I'm Italian.
 

Attachments

  • Immagine.png
    Immagine.png
    600.3 KB · Views: 28
Last edited:

Advertisement

I started getting the same error message a year ago. I could not figure it out, but I found a workaround, that suits my needs. This is the only way for me to avoid all the error messages. Note, that I do it myself manually, not in the Editor.
1. After you set World Coordinates to your map, take the image for the tile by opening the following link in a web-browser:
Note that you need to put your coordinates in the "center" parameter of the link above!
change "size" to the one you need. Say your tile is x = 2 and y = 2 in the Editor.
2. For tile x = 2 and y = 3 you need to add 0.00490 to the x-axis of the "center" parameter in the above link.
3. For tile x = 3 and y = 2 you need to add 0.00550 to the y-axis of the "center" parameter in the above link.
4. For tile x = 2 and y = 1 you need to subtract 0.00490 from the x-axis of the "center" parameter in the above link.
5. For tile x = 1 and y = 2 you need to subtract 0.00550 from the y-axis of the "center" parameter in the above link.

When you open the link, you then just need to save the image to the "aerials" folder. !Pay attention! to the naming convention there: tile_x_y.map.aerial.jpg
Here, you replace "x" and "y" with the corresponding numbers of the tile, shown in the Editor - tab "Tile". For the above example, the image for tile x = 2 and y = 2 has to be named "tile_2_2.map.aerial.jpg"
 
Has anybody managed to "paint" those aerials using "Paint on layer" option and see them in the Game itself? I tried to create a layer for the tile, paint it on the tile, but then in the Game I see the image repeated 4 times - like 4 copies of the image put one next to the other. I just need one copy of the image to cover the whole tile, but it does not work like this! Thank you in advance!
 

Road-hog123

An Orange Bus
FF Council
UKDT
Add-on London Team
Dec 10, 2015
2,287
109
3,158
Kent, UK
roadhog123.co.uk
Pronouns
He/Him
The link ends at service=google, the remaining bit is the label to tell you what each link does. I've updated the tutorial to make that clearer. The servers did go down last year or something because the url changed, but the tutorial includes the updated url. If you can't get the Google imagery working, try one of the other urls, it seems like the Google Maps stuff might require an API code of its own now.
 

Advertisement

This thread is more than 51 days old.

Your message may be considered spam for the following reasons:

Users who are viewing this thread