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 c46cf0c..abd79fa 100644 --- a/style.json +++ b/style.json @@ -414,6 +414,82 @@ "line-width": {"base": 1.4, "stops": [[4, 2], [6, 1.3], [20, 30]]} } }, + { + "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",