Commit 1ae4377e authored by Adrien Pavie's avatar Adrien Pavie
Browse files

MapCSS styles done (closes #18)

parent cc4ec91d
......@@ -71,6 +71,7 @@ coreprepare:
# Copy HTML/Conf files
cp $(SRC_FOLDER)/*.html $(DIST_FOLDER)/
cp -r $(SRC_FOLDER)/conf $(DIST_FOLDER)/
mkdir $(DIST_FOLDER)/styles/
./mapcss.import.sh
# Prepare images
mkdir -p $(DIST_FOLDER)/img
......
......@@ -277,6 +277,6 @@
"mapcss": {
"folder": "styles",
"default": "default.mapcss"
"default": "basic.mapcss"
}
}
{
"styles": {
"amenity": [
{
"description": "Small amenities",
"onTags": [ { "amenity": "bbq|drinking_water|bench|seat|clock|recycling|waste_basket|ticket_validator|heater|showcase" } ],
"isDetail": true,
"style": { "color": "#FFBA66" }
},
{
"name": "Stand-up bench",
"description": "Stand-up bench icon",
"onTags": [ { "bench:type": "stand_up" } ],
"style": { "icon": "bench_type_stand_up.png" }
}
],
"barrier": [
{
"name": "Hedge",
"description": "Hedge",
"onTags": [ { "barrier": "hedge" } ],
"style": { "color": "#8CD16E", "icon": "none" }
},
{
"onTags": [ { "barrier": "shelf" } ],
"style": { "color": "#DBA0A0", "fillColor": "#DBA0A0" }
},
{
"description": "Checkouts",
"onTags": [ { "barrier": "self_checkout|checkout" } ],
"style": { "fillColor": "#EEEEEE", "icon": "barrier_${barrier}.png" }
}
],
"emergency": [
{
"name": "${emergency}",
"description": "Emergency",
"isDetail": true,
"onTags": [ { "emergency": "*" } ],
"style": { "icon": "emergency_${emergency}.png" }
}
],
"man_made": [
{
"name": "CCTV",
"description": "Surveillance",
"onTags": [ { "man_made": "surveillance" } ],
"isDetail": true,
"style": { "icon": "man_made_surveillance.png" }
},
{
"name": "Lamp",
"description": "Lamp",
"onTags": [ { "man_made": "lamp|street_lamp" } ],
"isDetail": true,
"style": { "icon": "man_made_lamp.png" }
}
],
"tourism": [
{
"name": "${artwork_type} (artwork)",
"description": "Artwork icons",
"onTags": [ { "artwork_type": "sculpture|statue|stone|bust|mural" } ],
"style": {
"icon": "artwork_type_${artwork_type}.png",
"iconAlias": { "sculpture": "statue", "stone": "statue", "bust": "statue" }
}
}
],
"information": [
{
"name": "${information} (information)",
"description": "Information icons",
"onTags": [ { "information": "*" } ],
"isDetail": true,
"style": {
"color": "#7583D9", "opacity": 1,
"icon": "information_${information}.png"
}
},
{
"description": "Information icons with support",
"onTags": [ { "information": "board", "support": "*" } ],
"style": { "icon": "information_${information}_${support}.png" }
}
],
"advertising": [
{
"name": "${advertising}",
"description": "Advertising icons",
"onTags": [ { "advertising": "*" } ],
"isDetail": true,
"style": {
"color": "#5B5B5B", "opacity": 1,
"icon": "pub_${advertising}.png",
"iconAlias": { "sign": "poster_box", "wall_painting": "poster_box" }
}
},
{
"description": "Advertising icons with specific support",
"onTags": [ { "advertising": "billboard", "support": "pole" } ],
"style": {
"icon": "pub_${advertising}_${support}.png"
}
}
],
"cult": [
{
"name": "${cult} (religious)",
"description": "Religion-related feature",
"onTags": [ { "cult": "*" } ],
"style": { "showMissingIcon": true, "color": "#C0B0A2", "opacity": 1, "weight": 1, "fillColor": "#F7E1CF", "fillOpacity": 1, "layer": -1 }
}
],
"pole": [
{
"name": "Landmark sign",
"description": "Landmark sign",
"onTags": [ { "pole": "landmark_sign" } ],
"isDetail": true,
"style": { "icon": "pole_landmark_sign.png", "label": "ref" }
}
],
"power": [
{
"name": "Charging bike",
"description": "Charging bike icon",
"onTags": [ { "generator:type": "bicycle" } ],
"isDetail": true,
"style": { "icon": "generator_type_bicycle.png" }
}
]
},
"olddetails": {
"access": {
"name": "Access",
......
......@@ -361,7 +361,7 @@ way[railway=~/rail|subway|light_rail|monorail|narrow_gauge|tram/] {
dashes: 5,5;
}
*[railway=~/platform|subway_entrance|buffer_stop/] {
*[railway=~/platform|subway_entrance/] {
icon-image: url('railway_$[railway].png');
icon-width: 24;
icon-height: 24;
......
......@@ -5,32 +5,25 @@ meta {
icon-image: url('icon_loupe.png');
}
node, way {
width: 5;
opacity: 0.9;
color: green;
fill-color: green;
fill-opacity: 0.5;
z-index: 1;
icon-image: url('icon_default.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 0.7;
font-family: Arial;
font-size: 12;
font-weight: bold;
font-style: italic;
text-color: red;
text-opacity: 0.5;
text-offset: -12;
/****************************************************************************
* Amenities
*/
/** All amenities **/
*[amenity] {
fill-color: #FFDAAD;
opacity: 1;
fill-opacity: 1;
icon-image: url('amenity_$[amenity].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
text: name;
/*text-position: line;*/
}
line {
text-position: line;
/** Stand up bench **/
*[amenity=~/bench|seat/][bench:type=stand_up] {
icon-image: url('bench_type_stand_up.png');
}
/** Vending machine icons **/
......@@ -38,3 +31,112 @@ line {
icon-image: url('vending_$[vending].png');
icon-image-aliases: '"news_papers": "newspapers"';
}
/****************************************************************************
* Barriers
*/
*[barrier=hedge] {
color: #8CD16E;
}
*[barrier=shelf] {
color: #DBA0A0;
fill-color: #DBA0A0;
}
*[barrier=~/self_checkout|checkout/] {
fill-color: #EEEEEE;
icon-image: url('barrier_$[barrier].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Railway
*/
*[railway=buffer_stop] {
icon-image: url('railway_$[railway].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Emergency
*/
*[emergency] {
icon-image: url('emergency_$[emergency].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Man made
*/
*[man_made=~/surveillance|lamp|street_lamp/] {
icon-image: url('man_made_$[man_made].png');
icon-image-aliases: '"street_lamp": "lamp"';
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Tourism
*/
*[artwork_type=~/sculpture|statue|stone|bust|mural/] {
icon-image: url('artwork_type_$[artwork_type].png');
icon-image-aliases: '"sculpture": "statue", "stone": "statue", "bust": "statue"';
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Signaletics
*/
*[information] {
color: #7583D9;
opacity: 1;
icon-image: url('information_$[information].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
*[information=board][support] {
icon-image: url('information_$[information]_$[support].png');
}
*[advertising] {
color: #5B5B5B;
opacity: 1;
icon-image: url('pub_$[advertising].png');
icon-image-aliases: '"sign": "poster_box", "wall_painting": "poster_box"';
}
*[advertising=billboard][support=pole] {
icon-image: url('pub_$[advertising]_$[support].png');
}
*[pole=landmark_sign] {
icon-image: url('pole_landmark_sign.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
text: ref;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment