Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Converter station rendering
Russ Garrettc5830f9e8c36
diff --git a/sprites/converter.svg b/sprites/converter.svgnew file mode 100644index 0000000..8b2eb82--- /dev/null+++ b/sprites/converter.svg@@ -0,0 +1,26 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="24" height="24" viewBox="0, 0, 24, 24">+ <g id="Layer_1">+ <g>+ <path d="M12.5,23.529 C6.377,23.529 1.413,18.578 1.413,12.471 C1.413,6.363 6.377,1.412 12.5,1.412 C18.623,1.412 23.587,6.363 23.587,12.471 C23.587,18.578 18.623,23.529 12.5,23.529 z" fill="#FFFFFF"/>+ <path d="M12.5,23.529 C6.377,23.529 1.413,18.578 1.413,12.471 C1.413,6.363 6.377,1.412 12.5,1.412 C18.623,1.412 23.587,6.363 23.587,12.471 C23.587,18.578 18.623,23.529 12.5,23.529 z" fill-opacity="0" stroke="#000000" stroke-width="1.8"/>+ </g>+ <path d="M4.078,20.886 L20.848,4.056" fill-opacity="0" stroke="#000000" stroke-width="0.72"/>+ </g>+ <g id="ACDC" display="none">+ <path d="M5.398,8.106 L5.398,8.106" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M0.5,0.5 L0.5,0.5" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M6.448,6.816 L6.448,6.816" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M12.658,8.409 C12.496,9.649 11.63,10.704 10.363,10.704 C9.095,10.704 8.305,9.861 8.068,8.709 C7.812,7.467 7.04,6.414 5.773,6.414 C4.505,6.414 3.616,7.429 3.478,8.709" fill-opacity="0" stroke="#000000" stroke-width="0.72" stroke-linecap="round"/>+ <path d="M12.658,15.255 L20.331,15.255" fill-opacity="0" stroke="#000000" stroke-width="0.72"/>+ <path d="M12.658,17.055 L20.331,17.055" fill-opacity="0" stroke="#000000" stroke-width="0.72" stroke-dasharray="1.44,0.72"/>+ </g>+ <g id="ACAC" display="none">+ <path d="M5.398,8.106 L5.398,8.106" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M0.5,0.5 L0.5,0.5" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M6.448,6.816 L6.448,6.816" fill-opacity="0" stroke="#000000" stroke-width="1.2"/>+ <path d="M12.658,8.409 C12.496,9.649 11.63,10.704 10.363,10.704 C9.095,10.704 8.305,9.861 8.068,8.709 C7.812,7.467 7.04,6.414 5.773,6.414 C4.505,6.414 3.616,7.429 3.478,8.709" fill-opacity="0" stroke="#000000" stroke-width="0.72" stroke-linecap="round"/>+ <path d="M20.848,17.309 C20.686,18.55 19.82,19.604 18.553,19.604 C17.285,19.604 16.495,18.761 16.258,17.609 C16.002,16.368 15.23,15.314 13.963,15.314 C12.695,15.314 11.806,16.33 11.668,17.609" fill-opacity="0" stroke="#000000" stroke-width="0.72" stroke-linecap="round"/>+ </g>+</svg>diff --git a/src/key/key.js b/src/key/key.jsindex fc8b6c7..d4b3c22 100644--- a/src/key/key.js+++ b/src/key/key.js@@ -172,6 +172,7 @@ class KeyControl {['Transformer', this.sprite('power_transformer')],['Switch', this.sprite('power_switch')],['Compensator', this.sprite('power_compensator')],+ ['Converter', this.sprite('converter')],];let table = list('table', Tr);table.update(rows);diff --git a/src/style/style_oim_power.js b/src/style/style_oim_power.jsindex 11c5883..64803ef 100644--- a/src/style/style_oim_power.js+++ b/src/style/style_oim_power.js@@ -766,7 +766,7 @@ const layers = [zorder: 268,id: 'power_substation_point',type: 'circle',- filter: ['all', substation_visible_p, substation_point_visible_p],+ filter: ['all', substation_visible_p, substation_point_visible_p, ['!=', ['get', 'substation'], 'converter']],source: 'openinframap','source-layer': 'power_substation_point',minzoom: 5,@@ -891,6 +891,47 @@ const layers = [},paint: text_paint,},+ {+ zorder: 562,+ id: 'power_converter_point',+ type: 'symbol',+ filter: ['all', ['==', ['get', 'substation'], 'converter'], substation_point_visible_p],+ source: 'openinframap',+ 'source-layer': 'power_substation_point',+ minzoom: 5.5,+ maxzoom: 12,+ layout: {+ 'icon-image': 'converter',+ 'icon-size': ['interpolate', ['linear'], ['zoom'],+ 5, 0.6,+ 8, 1+ ],+ 'text-field': substation_label,+ 'text-anchor': 'top',+ 'text-offset': [0, 1.2],+ 'text-size': [+ 'interpolate',+ ['linear'],+ ['zoom'],+ 7,+ 10,+ 18,+ [+ 'interpolate',+ ['linear'],+ ['coalesce', ['get', 'output'], 0],+ 0,+ 10,+ 2000,+ 16,+ ],+ ],+ 'text-optional': true,+ },+ paint: Object.assign({}, text_paint, {+ 'text-opacity': ['step', ['zoom'], 0, 7, 1],+ }),+ },{zorder: 563,id: 'power_plant_label',