From 9a1c03a959810e1a493191c204d973db8beba4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Fri, 9 Mar 2018 15:24:07 +0100 Subject: [PATCH] Add oneway road arrow --- icons/oneway.svg | 1 + style.json | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 icons/oneway.svg diff --git a/icons/oneway.svg b/icons/oneway.svg new file mode 100644 index 0000000..08c11ec --- /dev/null +++ b/icons/oneway.svg @@ -0,0 +1 @@ +oneway.svg \ No newline at end of file diff --git a/style.json b/style.json index c22c279..d34132a 100644 --- a/style.json +++ b/style.json @@ -797,6 +797,82 @@ } } }, + { + "id": "road_oneway", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + [ + "==", + "oneway", + 1 + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": "oneway", + "symbol-spacing": 200, + "icon-padding": 2, + "icon-rotation-alignment": "map", + "icon-rotate": 0, + "icon-size": { + "stops": [ + [ + 15, + 0.5 + ], + [ + 19, + 1 + ] + ] + } + }, + "paint": { + "icon-opacity": 0.5 + } + }, + { + "id": "road_oneway_opposite", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + [ + "==", + "oneway", + -1 + ] + ], + "layout": { + "symbol-placement": "line", + "icon-image": "oneway", + "symbol-spacing": 200, + "icon-padding": 2, + "icon-rotation-alignment": "map", + "icon-rotate": 180, + "icon-size": { + "stops": [ + [ + 15, + 0.5 + ], + [ + 19, + 1 + ] + ] + } + }, + "paint": { + "icon-opacity": 0.5 + } + }, { "id": "highway_motorway_subtle", "type": "line",