Some tweaks in default style

This commit is contained in:
Komяpa 2010-11-08 00:28:43 +02:00
parent 520ddfe1c2
commit 55361909f1

View file

@ -14,17 +14,8 @@ way {
/* ---------- ROADS ---------- */
way|z16-[highway] /*[!lanes]*/
{width:
eval(
any(
metric(tag("width")),
metric( num(tag("lanes")) * 4),
metric("3m")
)
{color:white;
);
color:white;
casing-width: 1; }
@ -63,7 +54,81 @@ way|z16-[highway] /*[!lanes]*/
casing-color:white;casing-dashes: eval(str( metric("1m") ) +"," + str( metric("1m") )); casing-linecap:butt;
offset: eval((cond((num(tag("lanes"))/2-int(num(tag("lanes")))/2) != 0, metric("3.6m")/2, 0)-(3-1)*metric("3.6m")));
}*/
way|z16-[surface=asphalt] {image: eval("styles/default/asphalt.png")}
way|z16-[highway=motorway],
way|z16-[highway=trunk],
{width:eval(metric(4*4));}
way|z16-[highway=primary]
{width:eval(metric(3*4));}
way|z16-[highway=secondary],
way|z16-[highway=tertiary],
way|z16-[highway=residential],
way|z16-[highway=trunk_link],
way|z16-[highway=motorway_link],
way|z16-[highway=primary_link],
way|z16-[highway=secondary_link],
{width:eval(metric(2*4));}
way|z16-[highway=service],
way|z16-[highway=track],
{width:eval(metric(1.5*4));}
way|z16-[highway=footway],
way|z16-[highway=pedestrian],
way|z16-[highway=path],
way|z16-[highway=steps],
{width:eval(metric(1*4));
}
way[lanes]{width:eval(metric( num(tag("lanes")) * 4));}
way[width]{width:eval(metric(tag("width")));}
way|z16-[highway=motorway],
way|z16-[highway=motorway_link],
way|z16-[highway=trunk],
way|z16-[highway=trunk_link],
way|z16-[highway=primary],
way|z16-[highway=primary_link],
way|z16-[highway=secondary],
way|z16-[highway=secondary_link],
way|z16-[highway=tertiary],
way|z16-[highway=tertiary_link],
way|z16-[highway=residential],
way|z16-[highway=service],
{image: "styles/default/asphalt.png";
z-index:5;
}
area|z16-[amenity=parking],
{fill-image: "styles/default/asphalt.png";
z-index:5; casing-width:1;
}
way|z16-[highway=footway],
way|z16-[highway=pedestrian],
{image: "styles/default/paving_stones6s.png";
z-index:4;}
way|z16-[highway=track],
{image: "styles/default/dirt.png";
z-index:3;}
way|z16-[highway=path],
{image: "styles/default/sand.png";z-index:2;}
way|z16-[layer<0],
{image: ""}
way|z16-[surface=asphalt] {image: "styles/default/asphalt.png"}
way|z16-[surface=grass] {image: eval("styles/default/"+tag("surface")+".png")}
way|z16-[surface=sand] {image: eval("styles/default/"+tag("surface")+".png")}
way|z16-[surface=dirt] {image: eval("styles/default/"+tag("surface")+".png")}
@ -113,11 +178,14 @@ way|z15-[highway=steps]
{z-index:5; width:eval(max(2, prop("width"))); color:#655; casing-dashes: 1,0; linecap: butt;casing-width: 1;}
{z-index:6; width:eval(max(2, prop("width"))); dashes: eval("1," + str( max(num(any(num(metric(tag("step:length")))/100, num(metric("0.3m"))))-1, 1) ) ); color: black;casing-width: 1;}
way[highway][area=yes] {fill-color: eval(prop("color")); width:0; fill-image: eval(prop("image"));}
way[bridge=yes] {casing-width:eval(min(3, num(prop("width"))/2 ));casing-linecap:butt}
area[highway][area=yes] {fill-color: eval(any(prop("fill-color"),prop("color"))); fill-image: eval(any(prop("fill-image"), prop("image")));}
/* ---------- FORESTS ---------- */
way[natural=forest],
way[natural=wood],
@ -138,23 +206,26 @@ way[waterway=stream]{color: #009;width: eval(max(3, metric(tag("width")) ))}
/* ---------- BUILDINGS ---------- */
way|z16-[barrier]{raise: eval(zmetric(tag("min_height")));}
way|z16-[barrier]{extrude: eval( zmetric(tag("height")) - num(prop("raise")) );}
way|z16-[building]{raise: eval( any( zmetric(tag("min_height")), zmetric ( num(tag("building:min_level")) * 3)));}
way|z16-[building] {fill-color: #522;
/*text: addr:housenumber;*/
text-halo-radius:2; z-index:100; text-position: center;
text-halo-radius:2; z-index:100; text-position: center;
opacity: 1;
fill-opacity: 1;
extrude: eval( any( zmetric(tag("height")), zmetric ( num(tag("building:levels")) * 3)) - num(prop("raise")) );
extrude: eval(zmetric("3m")*2);
extrude-face-color: #e2e2e2;
extrude-face-opacity: 1;
extrude-edge-width: 1;
extrude-edge-color: #404040;
}
way|z16-[barrier]{raise: eval(zmetric(tag("min_height")));extrude-face-opacity: 0.5}
way|z16-[barrier]{extrude: eval( zmetric(3) - num(prop("raise")) ); }
way|z16-[barrier][height]{extrude: eval( zmetric(tag("height")) - num(prop("raise")) ); }
way|z16-[building]{raise: eval( any( zmetric(tag("min_height")), zmetric ( num(tag("building:min_level")) * 3)));}
way|z16-[building][building:levels]{extrude: eval( zmetric(num(tag("building:levels"))*3) - num(prop("raise")) );}
way|z16-[building][height]{extrude: eval( zmetric(tag("height")) - num(prop("raise")) );}
@ -168,17 +239,22 @@ way|z10-[landuse=military] {fill-color: pink}
/* ---------- GARDENS&co ---------- */
way|z13-[landuse=allotments] {fill-color: #452; opacity: 0.8}
way|z10-[landuse=field] {fill-color: #CCCC4E; opacity: 0.8}
/* ---------- GRASS ---------- */
way|z16-[landuse=residential],
{fill-color: #cceecc; opacity: 0.8; fill-image: styles/default/grass.png; }
way|z16-[landuse=grass],
way|z16-[natural=grass]{fill-color: #cceecc; opacity: 0.8; fill-image: styles/default/grass.png}
way|z16-[natural=grass]
{fill-color: #cceecc; opacity: 0.8; fill-image: styles/default/grass.png; z-index: 6}
/* ---------- AMENITIES ---------- */
way|z15-[amenity=parking] {icon-image: styles/default/parking.png; fill-color:yellow}
way|z15-[amenity=parking] {icon-image: styles/default/parking.png; }
way[amenity=bench] {extrude: eval(zmetric("0.6m")); width:eval(metric("0.5m")); extrude-face-opacity:0;extrude-edge-color:black;color:brown;opacity:0.75}
{offset:eval(metric("0.25m")); extrude-face-color:brown;extrude:eval(zmetric("1.2m"));extrude-face-opacity: 0.5}
/* ---------- BORDERS ---------- */
way[boundary=administrative] {width: 2; color: red; dashes:5,3; z-index:15}
way|z-17[boundary=administrative] {text: name; text-position:center}
line[boundary=administrative] {width: 2; color: red; dashes:5,3; z-index:15}
area|z-17[boundary=administrative] {text: name; text-position:center}