Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Style updates
Russ Garrett447d0be1d0c7
diff --git a/dist/style/sprite.json b/dist/style/sprite.jsonindex 36b4787..fd93094 100644--- a/dist/style/sprite.json+++ b/dist/style/sprite.json@@ -1 +1 @@-{"power_plant":{"width":28,"height":28,"x":0,"y":0,"pixelRatio":1},"power_plant_coal":{"width":28,"height":28,"x":28,"y":0,"pixelRatio":1},"power_plant_geothermal":{"width":28,"height":28,"x":0,"y":28,"pixelRatio":1},"power_plant_hydro":{"width":28,"height":28,"x":28,"y":28,"pixelRatio":1},"power_plant_nuclear":{"width":28,"height":28,"x":56,"y":0,"pixelRatio":1},"power_plant_oilgas":{"width":28,"height":28,"x":84,"y":0,"pixelRatio":1},"power_plant_solar":{"width":28,"height":28,"x":56,"y":28,"pixelRatio":1},"power_plant_wind":{"width":28,"height":28,"x":84,"y":28,"pixelRatio":1},"comms_tower":{"width":15,"height":25,"x":0,"y":56,"pixelRatio":1},"power_transformer":{"width":14,"height":22,"x":15,"y":56,"pixelRatio":1},"power_wind":{"width":14,"height":14,"x":29,"y":56,"pixelRatio":1},"power_line_ref":{"width":34,"height":13,"x":43,"y":56,"pixelRatio":1},"power_pole":{"width":10,"height":10,"x":77,"y":56,"pixelRatio":1},"power_tower":{"width":7,"height":7,"x":87,"y":56,"pixelRatio":1}}\ No newline at end of file+{"power_plant":{"width":28,"height":28,"x":0,"y":0,"pixelRatio":1},"power_plant_coal":{"width":28,"height":28,"x":28,"y":0,"pixelRatio":1},"power_plant_geothermal":{"width":28,"height":28,"x":0,"y":28,"pixelRatio":1},"power_plant_hydro":{"width":28,"height":28,"x":28,"y":28,"pixelRatio":1},"power_plant_nuclear":{"width":28,"height":28,"x":56,"y":0,"pixelRatio":1},"power_plant_oilgas":{"width":28,"height":28,"x":84,"y":0,"pixelRatio":1},"power_plant_solar":{"width":28,"height":28,"x":56,"y":28,"pixelRatio":1},"power_plant_wind":{"width":28,"height":28,"x":84,"y":28,"pixelRatio":1},"comms_tower":{"width":15,"height":25,"x":0,"y":56,"pixelRatio":1},"power_compensator":{"width":14,"height":22,"x":15,"y":56,"pixelRatio":1},"power_transformer":{"width":14,"height":22,"x":29,"y":56,"pixelRatio":1},"power_tower":{"width":15,"height":15,"x":43,"y":56,"pixelRatio":1},"power_wind":{"width":14,"height":14,"x":58,"y":56,"pixelRatio":1},"power_line_ref":{"width":34,"height":13,"x":72,"y":56,"pixelRatio":1},"power_pole":{"width":10,"height":10,"x":0,"y":81,"pixelRatio":1},"power_switch":{"width":16,"height":7,"x":10,"y":81,"pixelRatio":1}}\ No newline at end of filediff --git a/dist/style/sprite.png b/dist/style/sprite.pngindex 988b2a5..12ad50e 100644Binary files a/dist/style/sprite.png and b/dist/style/sprite.png differdiff --git a/dist/style/[email protected] b/dist/style/[email protected]index f51236b..3e7d363 100644--- a/dist/style/[email protected]+++ b/dist/style/[email protected]@@ -1 +1 @@-{"power_plant":{"width":56,"height":56,"x":0,"y":0,"pixelRatio":2},"power_plant_coal":{"width":56,"height":56,"x":56,"y":0,"pixelRatio":2},"power_plant_geothermal":{"width":56,"height":56,"x":0,"y":56,"pixelRatio":2},"power_plant_hydro":{"width":56,"height":56,"x":56,"y":56,"pixelRatio":2},"power_plant_nuclear":{"width":56,"height":56,"x":112,"y":0,"pixelRatio":2},"power_plant_oilgas":{"width":56,"height":56,"x":168,"y":0,"pixelRatio":2},"power_plant_solar":{"width":56,"height":56,"x":112,"y":56,"pixelRatio":2},"power_plant_wind":{"width":56,"height":56,"x":168,"y":56,"pixelRatio":2},"comms_tower":{"width":30,"height":51,"x":0,"y":112,"pixelRatio":2},"power_transformer":{"width":28,"height":44,"x":30,"y":112,"pixelRatio":2},"power_wind":{"width":28,"height":28,"x":58,"y":112,"pixelRatio":2},"power_line_ref":{"width":68,"height":27,"x":86,"y":112,"pixelRatio":2},"power_pole":{"width":20,"height":20,"x":154,"y":112,"pixelRatio":2},"power_tower":{"width":14,"height":14,"x":174,"y":112,"pixelRatio":2}}\ No newline at end of file+{"power_plant":{"width":56,"height":56,"x":0,"y":0,"pixelRatio":2},"power_plant_coal":{"width":56,"height":56,"x":56,"y":0,"pixelRatio":2},"power_plant_geothermal":{"width":56,"height":56,"x":0,"y":56,"pixelRatio":2},"power_plant_hydro":{"width":56,"height":56,"x":56,"y":56,"pixelRatio":2},"power_plant_nuclear":{"width":56,"height":56,"x":112,"y":0,"pixelRatio":2},"power_plant_oilgas":{"width":56,"height":56,"x":168,"y":0,"pixelRatio":2},"power_plant_solar":{"width":56,"height":56,"x":112,"y":56,"pixelRatio":2},"power_plant_wind":{"width":56,"height":56,"x":168,"y":56,"pixelRatio":2},"comms_tower":{"width":30,"height":51,"x":0,"y":112,"pixelRatio":2},"power_compensator":{"width":28,"height":44,"x":30,"y":112,"pixelRatio":2},"power_transformer":{"width":28,"height":44,"x":58,"y":112,"pixelRatio":2},"power_tower":{"width":30,"height":30,"x":86,"y":112,"pixelRatio":2},"power_wind":{"width":28,"height":28,"x":116,"y":112,"pixelRatio":2},"power_line_ref":{"width":68,"height":27,"x":144,"y":112,"pixelRatio":2},"power_pole":{"width":20,"height":20,"x":0,"y":163,"pixelRatio":2},"power_switch":{"width":32,"height":14,"x":20,"y":163,"pixelRatio":2}}\ No newline at end of filediff --git a/dist/style/[email protected] b/dist/style/[email protected]index 3ee0651..b9a5b4d 100644Binary files a/dist/style/[email protected] and b/dist/style/[email protected] differdiff --git a/sprites/power_compensator.svg b/sprites/power_compensator.svgnew file mode 100644index 0000000..6f506b5--- /dev/null+++ b/sprites/power_compensator.svg@@ -0,0 +1,16 @@+<?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="14.173" height="22.11" viewBox="0, 0, 14.173, 22.11">+ <g id="Layer_1">+ <path d="M0.5,0 L13.673,0 C13.949,0 14.173,0.224 14.173,0.5 L14.173,21.61 C14.173,21.886 13.949,22.11 13.673,22.11 L0.5,22.11 C0.224,22.11 0,21.886 0,21.61 L0,0.5 C0,0.224 0.224,0 0.5,0 z" fill="#FFFFFF"/>+ <path d="M10.288,2.188" fill-opacity="0" stroke="#3B3B3B" stroke-width="1"/>+ <path d="M7.087,0.519 L7.087,8.206" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>+ <path d="M7.046,10.188 L7.046,19.281" fill-opacity="0" stroke="#3B3B3B" stroke-width="1"/>+ <path d="M0.54,8.394 L13.665,8.394" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>+ <path d="M0.54,10.188 L13.665,10.188" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>+ <g>+ <path d="M5.105,19.281 L9.149,19.281 L7.087,21.344 L5.024,19.281 z" fill="#3B3B3B"/>+ <path d="M5.105,19.281 L9.149,19.281 L7.087,21.344 L5.024,19.281 z" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-miterlimit="3"/>+ </g>+ </g>+</svg>diff --git a/sprites/power_pole.idraw b/sprites/power_pole.idrawdeleted file mode 100644index fa5d2ef..0000000Binary files a/sprites/power_pole.idraw and /dev/null differdiff --git a/sprites/power_switch.svg b/sprites/power_switch.svgnew file mode 100644index 0000000..63c918d--- /dev/null+++ b/sprites/power_switch.svg@@ -0,0 +1,10 @@+<?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="16" height="7" viewBox="0, 0, 16, 7">+ <g id="Layer_1">+ <path d="M0.5,0 L15.5,0 C15.776,0 16,0.224 16,0.5 L16,6.5 C16,6.776 15.776,7 15.5,7 L0.5,7 C0.224,7 0,6.776 0,6.5 L0,0.5 C0,0.224 0.224,0 0.5,0 z" fill="#FFFFFF"/>+ <path d="M10.288,2.188" fill-opacity="0" stroke="#3B3B3B" stroke-width="1"/>+ <path d="M1,5.359 L5.116,5.359 L8.821,1.641" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>+ <path d="M9.665,5.359 L14.853,5.359" fill-opacity="0" stroke="#3B3B3B" stroke-width="1" stroke-linecap="round"/>+ </g>+</svg>diff --git a/sprites/power_tower.svg b/sprites/power_tower.svgindex a42b96d..9c26121 100644--- a/sprites/power_tower.svg+++ b/sprites/power_tower.svg@@ -1,11 +1,10 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>--<svg xmlns="http://www.w3.org/2000/svg"- version="1.1"- width="7"- height="7">- <rect width="7" height="7" fill="#868686" />- <circle cx="3.5" cy="3.5" r="2.5" fill="white" />- <path d="M 0.625,1 6,6.375 6.375,6 1,0.625 z" fill="#868686" />- <path d="M 6,0.625 0.625,6 1,6.375 6.375,1 z" fill="#868686" />+<?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="15" height="15" viewBox="0, 0, 15, 15">+ <g id="Layer_1">+ <path d="M0,-0 L15,-0 L15,15 L0,15 z" fill="#3B3B3B"/>+ <path d="M12.857,7.5 C12.857,10.459 10.459,12.857 7.5,12.857 C4.541,12.857 2.143,10.459 2.143,7.5 C2.143,4.541 4.541,2.143 7.5,2.143 C10.459,2.143 12.857,4.541 12.857,7.5 z" fill="#FFFFFF"/>+ <path d="M1.339,2.143 L12.857,13.661 L13.661,12.857 L2.143,1.339 z" fill="#3B3B3B"/>+ <path d="M12.857,1.339 L1.339,12.857 L2.143,13.661 L13.661,2.143 z" fill="#3B3B3B"/>+ </g></svg>diff --git a/src/build_sprites.js b/src/build_sprites.jsindex 8eb24c5..f3090cf 100644--- a/src/build_sprites.js+++ b/src/build_sprites.js@@ -14,9 +14,9 @@ var path = require('path');});var basename;if (pxRatio == 1) {- basename = path.join(__dirname, '../dist/sprite');+ basename = path.join(__dirname, '../dist/style/sprite');} else {- basename = path.join(__dirname, '../dist/sprite@' + pxRatio + 'x');+ basename = path.join(__dirname, '../dist/style/sprite@' + pxRatio + 'x');}var pngPath = path.resolve(basename + '.png');diff --git a/src/style_oim_power.js b/src/style_oim_power.jsindex 9c21cec..2902a6a 100644--- a/src/style_oim_power.js+++ b/src/style_oim_power.js@@ -60,9 +60,13 @@ const substation_visible_p = ["all",[">", ['zoom'], 8]],['all',- [">", ['coalesce', ['get', 'voltage'], 0], 50],+ [">", ['coalesce', ['get', 'voltage'], 0], 19],[">", ['zoom'], 9]],+ ['all',+ [">", ['coalesce', ['get', 'voltage'], 0], 9],+ [">", ['zoom'], 10]+ ],[">", ['zoom'], 11]],["!=", ['get', 'substation'], 'transition']@@ -278,6 +282,39 @@ const layers = ['line-cap': 'round'}},+ {+ id: 'power_transformer',+ type: 'symbol',+ source: 'openinframap',+ 'source-layer': 'power_transformer',+ minzoom: 14,+ paint: text_paint,+ layout: {+ 'icon-image': 'power_transformer',+ }+ },+ {+ id: 'power_compensator',+ type: 'symbol',+ source: 'openinframap',+ 'source-layer': 'power_compensator',+ minzoom: 14,+ paint: text_paint,+ layout: {+ 'icon-image': 'power_compensator',+ }+ },+ {+ id: 'power_switch',+ type: 'symbol',+ source: 'openinframap',+ 'source-layer': 'power_switch',+ minzoom: 14,+ paint: text_paint,+ layout: {+ 'icon-image': 'power_switch',+ }+ },{id: 'power_tower',type: 'symbol',@@ -288,6 +325,10 @@ const layers = [paint: text_paint,layout: {'icon-image': 'power_tower',+ 'icon-size': ["interpolate", ["linear"], ["zoom"],+ 13, 0.5,+ 17, 1+ ],'text-field': '{ref}','text-size': ["step",// Set visibility by using size@@ -321,17 +362,6 @@ const layers = ['text-max-angle': 10}},- {- id: 'power_transformer',- type: 'symbol',- source: 'openinframap',- 'source-layer': 'power_transformer',- minzoom: 14,- paint: text_paint,- layout: {- 'icon-image': 'power_transformer',- }- },{id: 'power_wind_turbine',type: 'symbol',@@ -351,7 +381,7 @@ const layers = [source: 'openinframap','source-layer': 'power_substation_point',minzoom: 7,- maxzoom: 12,+ maxzoom: 13,layout: {},paint: {'circle-radius': substation_radius,