Skip to main content
Version: 3.13.0

Map Layers Configuration

The map layers configuration describes the layers of assets rendered by the network map. It is a geo-view configuration item, represented in json format, that groups the assets in the vector tiles into named layers and groups of layers, and specifies how each of those layers/groups is drawn, labelled, ordered, and searched upon.

The keep level specification decides what ends up in the vector tiles; the map layers configuration decides how the features in the tiles get organised and drawn.

The configuration is set under the mapLayersConfig key of the geoView and publicGeoView config objects, and is served to the network map through the getGeoViewConfig and getPublicGeoViewConfig GraphQL queries. If it is not provided, a default configuration covering the standard EWB network map layers is used.

  • Properties:
    • version: the version of the configuration format. This is the discriminator that selects how the rest of the object is interpreted, and is required. The only currently supported value is "1".
    • entries: the layers and groups of layers to render on the map, in the order they should be displayed in the layers panel.
    • enableOtherAssetsLayer: if true, assets in map tiles that are not matched by any of the provided layers will be included in an "Other assets" group.
{
"version": "1",
"entries": [ <CONFIG_ENTRY> ],
"enableOtherAssetsLayer": <boolean>
}

Config Entry

A config entry is either a group or a layer, selected by its type property. All entries share the following properties:

  • Properties:
    • type: how to interpret this entry. One of group, node, line, or polygon. A value of group makes the entry a group, and the other three values make it a layer.
    • name: the display name of this group or layer.
    • showInSearch: whether this group/layer should also be a filter option in the map search plugin.
    • cimClasses: a list of CIM classes this group/layer adds to the search filter, used when showInSearch is true.

Group

A group is a named collection of layers. Groups may only contain layers, they cannot be nested inside one another.

  • Properties:
    • type: should always be "group" for a group.
    • name: see Config Entry.
    • showInSearch: see Config Entry.
    • cimClasses: see Config Entry.
    • layers: the layers to display within this group.
{
"type": "group",
"name": <string>,
"showInSearch": <boolean>,
"cimClasses": [ <string> ],
"layers": [ <LAYER> ]
}

Layer

A layer is a set of assets rendered on the map. The type of a layer describes what shape of assets it draws, which affects how layout, paint, and capabilities are interpreted:

  • node - point assets, drawn as icons.

  • line - linear assets.

  • polygon - area assets.

  • Properties:

    • type: one of "node", "line", or "polygon".
    • name: see Config Entry.
    • showInSearch: see Config Entry.
    • cimClasses: see Config Entry.
    • sourceLayer: which layer within the map tiles these assets are on. See Source Layer for the possible values.
    • matchAssetsFilter: a Mapbox expression that picks out matching assets in map tiles.
    • minZoom: the minimum zoom level to display assets for this layer.
    • maxZoom: the maximum zoom level to display assets for this layer.
    • visibleByDefault: whether this layer is initially checked in the layers panel.
    • showLabelFilter: a Mapbox expression that determines when to show a label for the layer. Set it to false to give the layer no labels at all.
    • zIndex: the z-ordering of this layer. Higher values are placed on top of lower values.
    • iconExpression: a Mapbox expression selecting the icon to show on the map for this layer. node layers only.
    • iconSize: the size of icons for this layer, as a fixed number or a Mapbox expression. node layers only.
    • layout: adjust layer layout properties.
    • paint: adjust layer paint properties.
    • capabilities: a set of capabilities for this layer, that drive how its style could be modified dynamically by plugins to the network map.
    • labelText: a Mapbox expression that selects the label text to show for assets on this layer.
    • labelMinZoom: the minimum zoom level to display labels for this layer.
    • labelMaxZoom: the maximum zoom level to display labels for this layer.
    • labelLayout: adjust label text layout properties.
    • labelPaint: adjust label text paint properties.
    • labelZIndex: the z-ordering of this layer's labels. Higher values are placed on top of lower values.

Only type, name, showInSearch, sourceLayer, and matchAssetsFilter are required; every other property may be omitted, in which case the front-end will use some sensible default value.

{
"type": "<LAYER_TYPE>",
"name": <string>,
"showInSearch": <boolean>,
"cimClasses": [ <string> ],
"sourceLayer": "<SOURCE_LAYER>",
"matchAssetsFilter": <MAPBOX_EXPRESSION>,
"minZoom": <number>,
"maxZoom": <number>,
"visibleByDefault": <boolean>,
"showLabelFilter": <MAPBOX_EXPRESSION | boolean>,
"zIndex": <number>,
"iconExpression": <MAPBOX_EXPRESSION>, // "node" layers only
"iconSize": <MAPBOX_EXPRESSION | number>, // "node" layers only
"layout": { <MAPBOX_LAYOUT_PROPERTIES> },
"paint": { <MAPBOX_PAINT_PROPERTIES> },
"capabilities": { <CAPABILITIES> },
"labelText": <MAPBOX_EXPRESSION>,
"labelMinZoom": <number>,
"labelMaxZoom": <number>,
"labelLayout": { <MAPBOX_LAYOUT_PROPERTIES> },
"labelPaint": { <MAPBOX_PAINT_PROPERTIES> },
"labelZIndex": <number>
}

Mapbox Expressions

The matchAssetsFilter, showLabelFilter, iconExpression, iconSize, and labelText properties, along with the contents of the layout, paint, labelLayout, and labelPaint objects, are Mapbox style expressions. Expressions are evaluated against the properties of the assets in the vector tiles, e.g. ["==", "class", "Fuse"] matches assets whose class property is Fuse, and ["get", "symbol"] reads an asset's symbol property.

The properties of the assets in the vector tiles are currently hard-coded inside the server, and are listed below. Which properties an asset carries depends on its CIM class, so they are grouped below by the source layer the asset lands on.

Common Properties on Map Tile Features

Common Properties

Every asset on every layer carries these, except for assets on the meterServiceLocations layer (see below).

PROPERTYTypeDescription
classstringThe simple name of the asset's CIM class, e.g. AcLineSegment, Fuse, PowerTransformer.
idstringThe mRID of the asset.
namestringThe name of the asset, or an empty string if it has none.
symbolstringThe diagram object style of the asset, taken from the first diagram object that has one. Falls back to DEFAULT.
source-<change set>intWritten as 1 for each change set the asset appears in, one property per change set. The base network model is source-base, so an asset in the base model and a change set named csA carries both source-base and source-csA.
isVoltageLevelEhvboolPresent, and true, if the asset is at the sub-transmission/super-high voltage level. Only when true.
isVoltageLevelHvboolPresent, and true, if the asset is at the high/medium voltage level. Only when true.
isVoltageLevelLvboolPresent, and true, if the asset is at the low voltage level. Only when true.
isVoltageLevelUnknownboolPresent, and true, if no voltage level could be determined for the asset. Only when true.

Equipment Properties

Carried by assets on the conductors, busbars, nodes, and powerElectronicsUnit layers, in addition to the common properties.

PROPERTYTypeDescription
opresId1opresId<n>stringThe mRID of each operational restriction applied to this asset, numbered from 1.
opresCountintThe number of operational restrictions applied to this asset.

Container Properties

Carried by assets on the conductors, busbars, nodes, and powerElectronicsUnit layers, describing the equipment containers the asset belongs to. The names and ids are comma-separated lists where the asset is in more than one container of that type, and each group of properties is only present when the asset is in at least one container of that type. Power electronics units take these from their power electronics connection where they have one.

PROPERTYTypeDescription
substationsstringThe names of the substations containing this asset. Only when set.
substationIdsstringThe mRIDs of the substations containing this asset. Only when set.
circuitsstringThe names of the circuits containing this asset. Only when set.
circuitIdsstringThe mRIDs of the circuits containing this asset. Only when set.
feedersstringThe names of the feeders containing this asset. Where the asset is in an LV feeder, this is the LV feeder's energising feeders. Only when set.
feederIdsstringThe mRIDs of those feeders. Only when set.
lvFeedersstringThe names of the LV feeders containing this asset. Only when set.
lvFeederIdsstringThe mRIDs of the LV feeders containing this asset. Only when set.
penintA colour index from 0 to 13, derived from the asset's containers, used to give assets in the same container a consistent colour. Substations always use 13.
isAbnormalFeederboolPresent, and true, if the asset's current feeders differ from its normal feeders. Current state tiles only. Only when true.
isAbnormalLvFeederboolPresent, and true, if the asset's current LV feeders differ from its normal LV feeders. Current state tiles only. Only when true.

Conducting Equipment Properties

Carried by assets on the conductors, busbars, and nodes layers, in addition to the common, equipment, and container properties.

PROPERTYTypeDescription
voltageintThe base voltage of the asset in volts. Power transformers instead report their primary voltage, or 0 if it is unknown.
isSwerboolWhether the asset is part of a SWER section of the network.
nominalPhasesstringThe phase code of the asset's terminal with the most phases, e.g. ABCN, AN, NONE.
offSupplyboolPresent, and true, if every phase of every terminal is de-energised. Only when true.
partiallyOffSupplyboolPresent, and true, if some but not all phases are de-energised. Only when true.

Whether these are evaluated against the normal or current state of the network depends on which state the tiles were requested for.

conductors

Conductors carry the common, equipment, container, and conducting equipment properties, plus:

PROPERTYTypeDescription
isUndergroundboolWhether the conductor is underground.
impedancedoubleThe magnitude of the conductor's per length sequence impedance. Only set on AC line segments that have a per length sequence impedance with at least one of r/x set.
nullImpedanceboolPresent, and true, if the conductor has a per length sequence impedance but both its r and x are null. Only when true.
arrowDirectionstringThe name of the direction arrow symbol to draw along the conductor, based on the feeder direction of its terminals. One of the configured arrow symbols (DIRECTION-ARROW-RIGHT, DIRECTION-ARROW-LEFT, DIRECTION-ARROW-LOOP by default), or none.
lineDirectionstringDeprecated, prefer arrowDirection. The raw feeder direction along the conductor: normal, reverse, loop, or none.
displayNamestringThe conductor's name, or, where the name is just the mRID, the first of its lvFeeders, feeders, circuits, or substations.

busbars

Busbar sections carry the common, equipment, container, and conducting equipment properties, plus:

PROPERTYTypeDescription
displayNamestringThe busbar section's name.

nodes

Every conducting equipment that is not a conductor or busbar section lands here. All of them carry the common, equipment, container, and conducting equipment properties, plus:

PROPERTYTypeDescription
openboolTrue if the asset is a switch that is open, or if the asset is out of service. Equipment that cannot be opened is therefore still open while it is out of service.
rotationdoubleThe rotation of the asset's diagram object in degrees, or 0 if it has none.
zPriorityintA drawing priority from 1 to 8, derived from the asset's class and, for power transformers, its function. Used by the default config to sort overlapping icons.
isSwitchboolWhether the asset is a switch.

Switches additionally carry:

PROPERTYTypeDescription
displayNamestringThe switch name extracted by the switchNamePattern geo view config option. Only set when a pattern is configured and it matches the switch's name.
isAbnormalStateboolPresent, and true, if the switch's current open state differs from its normal open state. Current state tiles only. Only when true.

Power transformers additionally carry:

PROPERTYTypeDescription
displayNamestringThe transformer's name with a trailing " TRANS" removed.
functionstringThe transformer's function, e.g. powerTransformer, distributionTransformer, isolationTransformer, voltageRegulator, autotransformer, secondaryTransformer, other, UNKNOWN.

powerElectronicsUnit

Power electronics units carry the common, equipment, and container properties. They are not conducting equipment, so they carry none of the conducting equipment properties, and no properties of their own.

poles

Poles carry the common properties plus:

PROPERTYTypeDescription
displayNamestringThe pole's name.
classificationstringThe pole's classification, e.g. lv, lv/hv, sub-transmission. Only set when the pole has a non-blank classification.

meters

Meters carry the common properties plus:

PROPERTYTypeDescription
displayNamestringThe meter's name.

meterServiceLocations

Service locations carry only the following:

PROPERTYTypeDescription
idstringThe mRID of the meter's service location, or <meter mRID>-service-location if the meter has no service location.
namestringThe name of the service location, falling back to the meter's name.
displayNamestringThe same value as name.
isVoltageLevelEhv / isVoltageLevelHv / isVoltageLevelLv / isVoltageLevelUnknownboolAs per the common properties. Only when true.

operationalRestrictions

Operational restrictions carry the common properties plus:

PROPERTYTypeDescription
titlestringThe restriction's title. Only when set.
authorNamestringThe name of the author of the restriction. Only when set.
createdDateTimestringWhen the restriction was created, as an ISO-8601 instant. Only when set.
typestringThe type of the restriction. Only when set.
statusstringThe status of the restriction. Only when set.
commentstringThe comment on the restriction. Only when set.
equipmentId1equipmentId<n>stringThe mRID of each piece of equipment the restriction applies to, numbered from 1.
equipmentName1equipmentName<n>stringThe name of each of those pieces of equipment. Only set for equipment that has a name.
equipmentCountintThe number of pieces of equipment the restriction applies to.

Where the restriction has no diagram object style, its symbol falls back to the value of its type, rather than to DEFAULT. If the type is also unset, the symbol will be DEFAULT.

equipmentContainers and boundingBoxes

Equipment containers are rendered on both layers with the same properties — the common properties plus:

PROPERTYTypeDescription
displayNamestringThe container's name.
isUndergroundboolWhether the majority of the container's conductors are underground, by total length where lengths are known, otherwise by count.
offSupplyboolPresent, and true, if every conducting equipment in the container is off supply. Only when true.
penintA colour index from 0 to 13, derived from the container's name. Substations always use 13.

Public Geo View Tiles

Tiles served from the publicGeoView config carry a deliberately reduced set of properties, so a mapLayersConfig under publicGeoView can only match on these:

LayerPROPERTYTypeDescription
conductorsisUndergroundboolWhether the conductor is underground.
conductorsvoltageintThe base voltage of the conductor in volts.
conductorspenintA colour index from 0 to 13, derived from the conductor's containers.
equipmentContainers, boundingBoxestypestringThe simple name of the container's CIM class. Note this is type, not class as on the standard tiles.
equipmentContainers, boundingBoxesisUndergroundboolWhether the majority of the container's conductors are underground.
equipmentContainers, boundingBoxespenintA colour index from 0 to 13, derived from the container's name.

Assets of any other class carry no properties at all on the public geo view.

Capabilities

The capabilities of a layer describe how plugins may dynamically restyle the layer:

CAPABILITYDescription
voltageFilteringHow the layer participates in voltage filtering. One of respect-voltage-levels, any-level, or none.
enableDirectionArrowsWhether direction arrows may be drawn along the assets of this layer.
hasOffSupplyVariantWhether the layer has a distinct style for assets that are off supply.
hasPartiallyOffSupplyVariantWhether the layer has a distinct style for assets that are partially off supply.
enableRecolouringWhether plugins may recolour the assets of this layer (generally, colouring AC Line Segments by voltage, container or phase).
enableFilteringByNetworkHierarchyWhether the assets of this layer may be filtered by the network hierarchy.

Reference Config

The default configuration used for the geoView config, covering the standard EWB network map layers, is reproduced in full in the reference map layers configuration. It is what the server falls back to when no mapLayersConfig is provided, and it is a good idea to start from it and make modifications as needed, rather than writing a configuration from scratch.