This is the visual definition icon responsible for specifying how a map background is displayed. It controls features such as coastlines, land and sea shading and grid lines.
The macro language equivalent is
The Coastlines Editor
Map Layer Mode
Specifies how the background (land-sea shading) and foreground (grid, coastlines, rivers, borders and cities) map layers are rendered into the plot with respect to the data layers. The possible values are as follows:
- split: the coastlines icon is split into background and foreground map layers. The background map layer is rendered first, followed by the data layers with the foreground map layers appearing atop
- foreground: all the map layers are rendered on top of the data layers
- background: all the map layers are rendered below the data layers
The default value is split.
Script (Macro/Python) usage
If Map Layer Mode is set to split and the Coastlines icon appears after the data objects in the
plot(...) command, the coastlines are put on top of the data. This behaviour is required in order to maintain backward compatibility.
Adding a user-supplied shapefile as a layer
If you have a shapefile with geographical polygons, this can be added to a plot via the Coastlines icon. The relevant parameters are Map User Layer, Map User Layer Name, Map User Layer Style, Map User Layer Colour and Map User Layer Thickness. To use an own shapefile, set Map User Layer to On, then set Map User Layer Name to the path to the shapefile, with the base file name of the file as the last element. For example if the path to the shapefile is
/home/me/files and there is a shapefile called
MyShape.shp in that directory, then we would set this parameter to
The following screenshot shows the result of loading a shapefile of UK roads into Metview: