X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server%2Fserver%2Ftm2%2Fmapbox-studio-light.tm2%2Froads.mss;fp=org.simantics.maps.server%2Fserver%2Ftm2%2Fmapbox-studio-light.tm2%2Froads.mss;h=ca85be0778ff8aeb26c320f410748cb40dffc510;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/server/tm2/mapbox-studio-light.tm2/roads.mss b/org.simantics.maps.server/server/tm2/mapbox-studio-light.tm2/roads.mss new file mode 100644 index 00000000..ca85be07 --- /dev/null +++ b/org.simantics.maps.server/server/tm2/mapbox-studio-light.tm2/roads.mss @@ -0,0 +1,80 @@ +// dummy styles to set ordering (case below fill) +#transportation { + ::case { opacity: 1; } + ::fill { opacity: 1; } +} + +// consistent case size +@case: 2; + +// Road & Railway Fills // +#transportation[brunnel='tunnel'] { opacity: 0.5; } + +#transportation[zoom<11] { + line-color: @road; + line-width: 0.5; + [class='motorway'] { line-width: 1;} +} + +#transportation::fill[zoom>=11] { + ['mapnik::geometry_type'=2] { + line-color: @road; + line-width: 0.5; + [zoom>=15] { line-width: 1; } + [class='path'] { line-dasharray: 2,2;} + [class='major_rail'], + [class='minor_rail'] { line-dasharray: 3,3; } + [class='motorway'] { + [zoom>=11] { line-width: 2; } + [zoom>=12] { line-width: 3; } + [zoom>=14] { line-width: 4; } + [zoom>=16] { line-width: 7; } + [zoom>=18] { line-width: 10; } + } + [class='motorway'][ramp=1], + [class='trunk'], [class='primary'], [class='secondary'], [class='tertiary'] { + [zoom>=11] { line-width: 1; } + [zoom>=12] { line-width: 2; } + [zoom>=14] { line-width: 3; } + [zoom>=16] { line-width: 5; } + [zoom>=18] { line-width: 7; } + } + [class='minor'], + [class='service'] { + [zoom>=14] { line-width: 1; } + [zoom>=16] { line-width: 2; } + [zoom>=18] { line-width: 4; } + } + [class='service'] { line-dasharray: 4,2; } + } +} + +// Casing for high-zoom roads // +#transportation::case[zoom>=11] { + ['mapnik::geometry_type'=2] { + line-color: @land; + line-width: 1; + [class='motorway'] { + [zoom>=11] { line-width: 2 + @case; } + [zoom>=12] { line-width: 3 + @case; } + [zoom>=14] { line-width: 4 + @case; } + [zoom>=16] { line-width: 7 + @case; } + [zoom>=18] { line-width: 10 + @case; } + } + [class='motorway'][ramp=1], + [class='trunk'], [class='primary'], [class='secondary'], [class='tertiary'] { + [zoom>=11] { line-width: 1 + @case; } + [zoom>=12] { line-width: 2 + @case; } + [zoom>=14] { line-width: 3 + @case; } + [zoom>=16] { line-width: 5 + @case; } + [zoom>=18] { line-width: 7 + @case; } + } + [class='minor'], + [class='service'] { + [zoom>=14] { line-width: 1 + @case; } + [zoom>=16] { line-width: 2 + @case; } + [zoom>=18] { line-width: 4 + @case; } + } + [class='service'] { line-dasharray: 4,2; } + } +}