Loads an image map source into the current map. The newly loaded image will be added to the end of the list of map sources (see list-sources command).
- file: specifies the file name of the image. Image has to be georeferenced using a world file (see Georeferenced Images).
- background: specifies whether to draw the image in the background (value true) or in the foreground (value false). By default images are drawn in the background.
After executing the command, the current map source index will be set to this newly loaded source.
NOTE: You need to load a ruleset before loading any images, otherwise the command will fail. This is especially important if you're running your own custom scripts.
Drawing In The Background Vs. The Foreground
Georeferenced images can be drawn either in the background or in the foreground, depending on the nature of the image:
- Image which contains semitransparent data (like hillshading) is best drawn in the foreground, otherwise the image might be overlapped or hidden by other map sources.
- Opaque images might hide other data, so they are usually drawn in the background.
Loads the hypso.png file (it has to have the hypso.pgw world file) and draws it in the background.
load-image file=relief/hillshading.jpg background=false
Loads the hillshading.jpg file from the relief directory and draws it in the foreground.