Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
OpenStreetBrowser-basemap/roads.mapcss
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
432 lines (415 sloc)
8.65 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| line|z5-8[highway=motorway]::highway | |
| { | |
| color: #ff6838; | |
| width: eval(switch(zoom(), | |
| 5, 0.5, | |
| 6, 1, | |
| 7, 1.5, | |
| 8, 2 | |
| )); | |
| z-index: 12; | |
| } | |
| line|z9-[highway=motorway]::highway | |
| { | |
| set .highway_type=motorway; | |
| width: eval(round(power(zoom()-8, 1.2))+1); | |
| color: #ff6838; | |
| text-halo-color: #ff6838; | |
| z-index: 12; | |
| } | |
| line|z9-[highway=motorway_link]::highway | |
| { | |
| set .highway_type=motorway; | |
| width: eval( | |
| cond(zoom()>=14, round(power(zoom()-11, 1.2))+1, | |
| cond(zoom()>=13, 4, | |
| cond(zoom()>=10, 3, | |
| cond(zoom()>= 9, 2 | |
| ))))); | |
| color: #ff6838; | |
| text-halo-color: #ff6838; | |
| z-index: 6.5; | |
| } | |
| line|z5-8[highway=trunk]::highway | |
| { | |
| color: #ff8a00; | |
| width: eval(switch(zoom(), | |
| 5, 0.5, | |
| 6, 1, | |
| 7, 1.5, | |
| 8, 2 | |
| )); | |
| z-index: 11; | |
| } | |
| line|z9-[highway=trunk]::highway | |
| { | |
| set .highway_type=motorway; | |
| width: eval(round(power(zoom()-9, 1.2))+1); | |
| color: #ff8a00; | |
| text-halo-color: #ff8a00; | |
| z-index: 11; | |
| } | |
| line|z9-[highway=trunk_link]::highway | |
| { | |
| set .highway_type=motorway; | |
| width: eval( | |
| cond(zoom()>=14, round(power(zoom()-11, 1.2))+1, | |
| cond(zoom()>=13, 4, | |
| cond(zoom()>=10, 3, | |
| cond(zoom()>= 9, 2 | |
| ))))); | |
| color: #ff8a00; | |
| text-halo-color: #ff8a00; | |
| z-index: 6.5; | |
| } | |
| line|z7-9[highway=primary]::highway, | |
| line|z7-9[highway=primary_link]::highway | |
| { | |
| color: #deca00; | |
| width: eval(switch(zoom(), | |
| 6, 0.5, | |
| 7, 1, | |
| "8;9", 1.5 | |
| )); | |
| z-index: 10; | |
| } | |
| line|z10-[highway=primary]::highway, | |
| line|z10-[highway=primary_link]::highway | |
| { | |
| set .highway_type=major; | |
| width: eval(round(power(zoom()-9, 1.2))+1); | |
| color: #ffce00; | |
| text-halo-color: #ffce00; | |
| z-index: 10; | |
| } | |
| line|z7-9[highway=secondary]::highway, | |
| line|z7-9[highway=secondary_link]::highway | |
| { | |
| color: #ded042; | |
| width: eval(switch(zoom(), | |
| "7", 1, | |
| "8;9", 1.5 | |
| )); | |
| z-index: 9; | |
| } | |
| line|z10-[highway=secondary]::highway, | |
| line|z10-[highway=secondary_link]::highway | |
| { | |
| set .highway_type=major; | |
| width: eval(round(power(zoom()-10, 1.2))+1); | |
| color: #ffef4c; | |
| text-halo-color: #ffef4c; | |
| z-index: 9; | |
| } | |
| line|z8-11[highway=tertiary]::highway, | |
| line|z8-11[highway=tertiary_link]::highway | |
| { | |
| color: #ded896; | |
| width: eval(switch(zoom(), | |
| "8", 1, | |
| "9;10", 1.5 | |
| )); | |
| z-index: 8; | |
| } | |
| line|z11-[highway=tertiary]::highway, | |
| line|z11-[highway=tertiary_link]::highway | |
| { | |
| set .highway_type=major; | |
| width: eval(round(power(zoom()-11, 1.2))+1); | |
| color: #fff8b5; | |
| text-halo-color: #fff8b5; | |
| z-index: 8; | |
| } | |
| line|z11-13[highway=road]::highway, | |
| line|z11-13[highway=unclassified]::highway, | |
| line|z11-13[highway=residential]::highway | |
| { | |
| color: #a0a0a0; | |
| width: eval(switch(zoom(), | |
| 11, 0.5, | |
| 12, 1, | |
| 13, 1.5 | |
| )); | |
| z-index: 7; | |
| } | |
| line|z14-[highway=road]::highway, | |
| line|z14-[highway=unclassified]::highway, | |
| line|z14-[highway=residential]::highway | |
| { | |
| set .highway_type=minor; | |
| width: eval(round(power(zoom()-12, 1.2))+1); | |
| color: #ffffff; | |
| text-halo-color: #ffffff; | |
| z-index: 7; | |
| } | |
| line|z11-13[highway=pedestrian]::highway, | |
| line|z11-13[highway=living_street]::highway | |
| { | |
| color: #808080; | |
| width: eval(switch(zoom(), | |
| 11, 0.5, | |
| 12, 1, | |
| 13, 1.5 | |
| )); | |
| z-index: 6; | |
| } | |
| line|z14-[highway=pedestrian]::highway, | |
| line|z14-[highway=living_street]::highway | |
| { | |
| set .highway_type=pedestrian; | |
| width: eval(round(power(zoom()-12, 1.2))+1); | |
| color: #cdcdcd; | |
| text-halo-color: #cdcdcd; | |
| z-index: 6; | |
| } | |
| line|z12-14[highway=service]::highway | |
| { | |
| color: #a0a0a0; | |
| width: eval(switch(zoom(), | |
| 12, 0.5, | |
| 13, 1, | |
| 14, 1.5 | |
| )); | |
| z-index: 5; | |
| } | |
| line|z15-[highway=service]::highway | |
| { | |
| set .highway_type=pedestrian; | |
| width: eval(round(power(zoom()-13, 1.2))+1); | |
| color: #ffffff; | |
| text-halo-color: #ffffff; | |
| z-index: 5; | |
| } | |
| line|z12-14[highway=footway]::highway, | |
| line|z12-14[highway=cycleway]::highway, | |
| line|z12-14[highway=bridleway]::highway, | |
| line|z12-14[highway=steps]::highway, | |
| line|z12-14[highway=platform]::highway | |
| { | |
| color: #cdcdcd; | |
| width: eval(switch(zoom(), | |
| 12, 0.5, | |
| 13, 1, | |
| 14, 1.5 | |
| )); | |
| z-index: 4; | |
| } | |
| line|z15-[highway=footway]::highway, | |
| line|z15-[highway=cycleway]::highway, | |
| line|z15-[highway=bridleway]::highway, | |
| line|z15-[highway=steps]::highway, | |
| line|z15-[highway=platform]::highway | |
| { | |
| set .highway_type=footway; | |
| width: eval(round(power(zoom()-11, 0.7))+0); | |
| color: #cdcdcd; | |
| text-halo-color: #cdcdcd; | |
| z-index: 4; | |
| } | |
| line|z12-[highway=track]::highway | |
| { | |
| color: #a77300; | |
| text-halo-color: #a77300; | |
| text-color: #ffffff; | |
| width: eval(switch(zoom(), | |
| "12;13", 0.5, | |
| "14;15", 1, | |
| "16" , 2, | |
| 3 | |
| )); | |
| z-index: 3; | |
| set .highway_type=small; | |
| } | |
| line|z12-[highway=path]::highway | |
| { | |
| color: #a77300; | |
| text-halo-color: #a77300; | |
| text-color: #ffffff; | |
| width: eval(switch(zoom(), | |
| "12;13", 0.25, | |
| "14;15", 0.5, | |
| "16;17", 1, | |
| 2 | |
| )); | |
| z-index: 2; | |
| set .highway_type=small; | |
| } | |
| line.highway_type::highway | |
| { | |
| casing-width: eval(round(0.5+prop(width)/4)/2); | |
| casing-color: #909090; | |
| linecap: round; | |
| linejoin: round; | |
| casing-linecap: butt; | |
| font-size: ; | |
| font-size: eval( | |
| cond(prop(width)>=13, 13, | |
| cond(prop(width)>=10, 11, | |
| cond(prop(width)>=8, 9, | |
| cond(prop(width)>=5, 8, | |
| cond(zoom()>=17, 10, | |
| cond(zoom()>=16, 8 | |
| ))))))); | |
| text-halo-radius: 1; | |
| } | |
| line|z16[.highway_type=small]::highway | |
| { | |
| font-size: 8; | |
| } | |
| line|z17-[.highway_type=small]::highway | |
| { | |
| font-size: 10; | |
| } | |
| line[.highway_type=small][!bridge]::highway | |
| { | |
| casing-width: ; | |
| } | |
| line.highway_type[bridge]::highway | |
| { | |
| casing-color: #303030; | |
| } | |
| line|z13-[highway=steps]::road_feature | |
| { | |
| dashes: 1,4; | |
| color: #707070; | |
| width: eval(prop('width', 'highway')); | |
| z-index: 25; | |
| } | |
| line|z10-[highway=primary][tunnel]::highway, | |
| line|z10-[highway=primary_link][tunnel]::highway | |
| { | |
| color: #d8b321; | |
| } | |
| line|z10-[highway=motorway][tunnel]::highway, | |
| line|z10-[highway=motorway_link][tunnel]::highway | |
| { | |
| color: #ff916e; | |
| } | |
| line|z10-[highway=trunk][tunnel]::highway, | |
| line|z10-[highway=trunk_link][tunnel]::highway | |
| { | |
| color: #ffac4a; | |
| } | |
| line|z14-[highway=road][tunnel]::highway, | |
| line|z14-[highway=unclassified][tunnel]::highway, | |
| line|z14-[highway=residential][tunnel]::highway, | |
| line|z15-[highway=service][tunnel]::highway | |
| { | |
| color: #d9d9d9; | |
| } | |
| line|z14-[highway=pedestrian][tunnel]::highway, | |
| line|z14-[highway=living_street][tunnel]::highway, | |
| line.path|z15-[tunnel]::highway | |
| { | |
| color: #a7a7a7; | |
| } | |
| line.highway_type[tunnel]::highway | |
| { | |
| text-halo-radius: 0; | |
| casing-dashes: 5,5; | |
| casing-linecap: butt; | |
| } | |
| line.highway_type::highway_base_casing { | |
| layer: -9; | |
| casing-linecap: round; | |
| casing-width: eval(prop('casing-width', 'highway')); | |
| casing-color: eval(prop('casing-color', 'highway')); | |
| casing-dashes: eval(prop('casing-dashes', 'highway')); | |
| width: eval(prop('width', 'highway')); | |
| } | |
| line.highway_type[tunnel]::highway_base_casing | |
| { | |
| casing-linecap: none; | |
| } | |
| line.highway_type::highway_label { | |
| layer: 11; | |
| text-position: line; | |
| text-spacing: 128; | |
| font-size: eval(prop('font-size', 'highway')); | |
| text-halo-color: eval(prop('text-halo-color', 'highway')); | |
| text-halo-radius: eval(prop('text-halo-radius', 'highway')); | |
| text-color: eval(any(tag('.street-text-color'), '#000000')); | |
| z-index: eval(prop('z-index', 'highway')); | |
| font-style: eval(prop('font-style', 'highway')); | |
| font-size: eval(prop('font-size', 'highway')); | |
| text: eval(cond(prop('font-size'); tag(name))); | |
| } | |
| /* Highway Areas */ | |
| // TODO: casing on same layer as lines | |
| area|z11-[highway=pedestrian]::highway | |
| { | |
| color: #909090; | |
| fill-color: #cdcdcd; | |
| linejoin: round; | |
| linecap: round; | |
| set .highway_area; | |
| } | |
| area|z11-[highway=pedestrian][tunnel]::highway | |
| { | |
| fill-color: #a7a7a7; | |
| } | |
| area|z11-[amenity=parking]::highway | |
| { | |
| fill-color: #e0e0e0; | |
| color: #a0a0a0; | |
| set .highway_area; | |
| } | |
| area|z11-[amenity=parking][tunnel]::highway | |
| { | |
| fill-color: #b7c6d1; | |
| } | |
| area.highway_area::highway | |
| { | |
| set area=eval(area(prop("geo"))); | |
| } | |
| area.highway_area[tunnel]::highway | |
| { | |
| dashes: 5,5; | |
| fill-color: #a7a7a7; | |
| } | |
| area.highway_area[bridge]::highway | |
| { | |
| color: #000000; | |
| } | |
| area.highway_area::highway_casing | |
| { | |
| layer: -10; | |
| color: eval(prop('color', 'highway')); | |
| width: eval( | |
| cond(zoom()>=16, 3, | |
| cond(zoom()>=15, 2, | |
| 1 | |
| ))); | |
| } | |
| // label | |
| area|z18-[highway=pedestrian]::highway_label, | |
| area|z14-[highway=pedestrian][area>500]::highway_label { | |
| text-halo-radius: 1; | |
| font-size: 8; | |
| text-wrap-width: 20; | |
| text: name; | |
| text-halo-color: #cdcdcd; | |
| text-color: #000000; | |
| layer: 10; | |
| z-index: -1; | |
| } | |
| area|z15-[highway=pedestrian][area>1500][area<=6000]::highway_label { | |
| text-halo-radius: 1; | |
| font-size: 10; | |
| text-wrap-width: 20; | |
| text: name; | |
| text-halo-color: #cdcdcd; | |
| text-color: #000000; | |
| layer: 10; | |
| z-index: -2; | |
| } | |
| area|z15-[highway=pedestrian][area>6000]::highway_label { | |
| text-halo-radius: 1; | |
| font-size: 12; | |
| text-wrap-width: 20; | |
| text: name; | |
| text-halo-color: #cdcdcd; | |
| text-color: #000000; | |
| layer: 10; | |
| z-index: -3; | |
| } |