Commit cc4ec91d authored by Adrien Pavie's avatar Adrien Pavie
Browse files

Basic style in MapCSS done

parent b9221514
......@@ -2,71 +2,12 @@
"styles": {
"amenity": [
{
"name": "${amenity} (amenity)",
"description": "Amenities",
"onTags": [ { "amenity": "*" } ],
"style": {
"fillColor": "#FFDAAD", "opacity": 1, "fillOpacity": 1, "icon": "amenity_${amenity}.png", "label": "name", "labelStyle": "amenity",
"iconAlias": { "seat": "bench" }
}
},
{
"description": "Small amenities",
"onTags": [ { "amenity": "bbq|drinking_water|atm|bench|seat|clock|photo_booth|post_box|recycling|vending_machine|waste_basket|ticket_validator|piano|telephone|parking_space|heater|showcase" } ],
"onTags": [ { "amenity": "bbq|drinking_water|bench|seat|clock|recycling|waste_basket|ticket_validator|heater|showcase" } ],
"isDetail": true,
"style": { "color": "#FFBA66" }
},
{
"description": "Set layer for amenities which are kind of landuses",
"onTags": [ { "amenity": "school|college|university|hospital|parking" } ],
"style": { "layer": -9 }
},
{
"description": "Independant amenities",
"onTags": [ { "amenity": "parking|parking_space|taxi|bus_station|shelter" } ],
"style": { "weight": 1, "color": "#E0BF96" }
},
{
"name": "Disabled parking",
"description": "Parking for disabled people",
"onTags": [ { "amenity": "parking_space", "wheelchair": "yes" }, { "amenity": "parking_space", "capacity:disabled": "*" } ],
"style": { "icon": "parking_disabled.png" }
},
{
"name": "${vending} (vending)",
"description": "Vending",
"onTags": [ { "vending": "*" } ],
"isDetail": true,
"style": {
"icon": "vending_${vending}.png",
"iconAlias": { "news_papers": "newspapers" }
}
},
{
"name": "Toilets (women)",
"description": "Toilets for women",
"onTags": [ { "amenity": "toilets", "female": "yes|only|designated" } ],
"style": { "icon": "amenity_toilets_women.png" }
},
{
"name": "Toilets (men)",
"description": "Toilets for men",
"onTags": [ { "amenity": "toilets", "male": "yes|only|designated" } ],
"style": { "icon": "amenity_toilets_men.png" }
},
{
"name": "Toilets",
"description": "Toilets for women",
"onTags": [ { "amenity": "toilets", "female": "yes", "male": "yes" } ],
"style": { "icon": "amenity_toilets.png" }
},
{
"name": "Toilets (disabled)",
"description": "Toilets for disabled people",
"onTags": [ { "amenity": "toilets", "wheelchair": "yes|only|designated" } ],
"style": { "icon": "amenity_toilets_disabled.png" }
},
{
"name": "Stand-up bench",
"description": "Stand-up bench icon",
......@@ -93,14 +34,6 @@
}
],
"amenity|public_transport|room|area": [
{
"description": "Comfort amenities",
"onTags": [ { "amenity": "toilets" }, { "public_transport": "waiting_area" }, { "room": "waiting" }, { "area": "waiting" } ],
"style": { "fillColor": "#E3C8E3" }
}
],
"emergency": [
{
......@@ -129,28 +62,7 @@
}
],
"shop": [
{
"name": "${shop} (shop)",
"description": "Shops",
"onTags": [ { "shop": "*" } ],
"style": { "color": "#AAAAAA", "fillColor": "#FFDAAD", "opacity": 1, "fillOpacity": 1, "icon": "shopping_${shop}.png", "label": "name", "labelStyle": "shop" }
},
{
"name": "Mall",
"description": "Mall surface",
"onTags": [ { "shop": "mall" } ],
"style" : { "color": "#AAAAAA", "opacity": 1, "weight": 0.8, "fillColor": "#EEEEEE", "fillOpacity": 1, "layer": -9 }
}
],
"tourism": [
{
"name": "${tourism} (tourism)",
"description": "Tourism icons",
"onTags": [ { "tourism": "*" } ],
"style": { "icon": "tourism_${tourism}.png", "color": "#BF9962", "fillColor": "#FFF6AD", "opacity": 1, "fillOpacity": 1, "label": "name", "labelStyle": "tourism" }
},
{
"name": "${artwork_type} (artwork)",
"description": "Artwork icons",
......@@ -173,11 +85,6 @@
"icon": "information_${information}.png"
}
},
{
"description": "Show large information objects",
"onTags": [ { "information": "office" } ],
"isDetail": false
},
{
"description": "Information icons with support",
"onTags": [ { "information": "board", "support": "*" } ],
......@@ -208,31 +115,6 @@
}
],
"aeroway": [
{
"name": "${aeroway}",
"description": "Airport-related icons",
"onTags": [ { "aeroway": "*" } ],
"style": { "icon": "aeroway_${aeroway}.png" }
}
],
"historic": [
{
"name": "Historic",
"description": "Historic element",
"onTags": [ { "historic": "*" } ],
"isDetail": true,
"style": { "color": "#C0B0A2", "opacity": 0.5, "weight": 0.5, "fillColor": "#C0B0A2", "fillOpacity": 0.5, "layer": -1 }
},
{
"name": "Tomb",
"description": "Tomb",
"onTags": [ { "historic": "tomb" } ],
"style": { "icon": "historic_tomb.png" }
}
],
"cult": [
{
"name": "${cult} (religious)",
......@@ -242,15 +124,6 @@
}
],
"landuse": [
{
"name": "Grass",
"description": "Grass landuse",
"onTags": [ { "landuse": "grass" } ],
"style": { "opacity": 0, "weight": 0, "fillColor": "#CFECA8", "fillOpacity": 1, "layer": -1 }
}
],
"pole": [
{
"name": "Landmark sign",
......@@ -269,23 +142,6 @@
"isDetail": true,
"style": { "icon": "generator_type_bicycle.png" }
}
],
"department": [
{
"name": "${department} (department)",
"description": "Part of a large amenity",
"onTags": [ { "department": "*" } ],
"style": { "fillColor": "#FFCFCC", "color": "#D29494", "fillOpacity": 1, "layer": -4, "opacity": 1, "weight": 0.5, "label": "name", "labelStyle": "area" }
},
{
"name": "${vending} (store departement)",
"onTags": [ { "department": "store_section", "vending": "*" } ],
"style": {
"icon": "vending_${vending}.png",
"iconAlias": { "news_papers": "newspapers", "drinks": "drink", "vegetables": "vegetable" }
}
}
]
},
......
......@@ -29,6 +29,111 @@ meta {
*[highway=bus_stop] {
icon-image: url('highway_bus_stop.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/****************************************************************************
* Amenities
*/
*[amenity=~/bar|biergarten|cafe|fast_food|food_court|ice_cream|pub|restaurant|college|kindergarten|library|school|music_school|driving_school|language_school|university|car_rental|parking|taxi|atm|bank|bureau_de_change|clinic|dentist|doctors|hospital|nursing_home|pharmacy|social_facility|veterinary|arts_centre|brothel|casino|cinema|community_centre|gambling|nightclub|planetarium|social_centre|stripclub|studio|swingerclub|animal_boarding|animal_shelter|courthouse|coworking_space|crematorium|crypt|dojo|embassy|fire_station|gym|internet_cafe|photo_booth|place_of_worship|police|post_box|post_office|sauna|shower|telephone|toilets|piano|parking_space/] {
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;
}
/** Comfort amenities **/
*[amenity=toilets],
*[public_transport=waiting_area],
*[room=waiting],
*[area=waiting] {
fill-color: #E3C8E3;
}
/** Small amenities **/
*[amenity=~/atm|photo_booth|post_box|piano|telephone|parking_space/] {
color: #FFBA66;
}
/** Large, landuse-like, amenities **/
area[amenity=~/school|college|university|hospital|parking/] {
z-index: -9;
}
/** Independant amenities **/
*[amenity=~/parking|parking_space|taxi|bus_station|shelter/] {
color: #E0BF96;
width: 1;
}
/** Parking for disabled people **/
*[amenity=parking_space][wheelchair=yes],
*[amenity=parking_space][capacity:disabled] {
icon-image: url('parking_disabled.png');
}
/** Toilets **/
*[amenity=toilets][female=~/yes|only|designated/][!male],
*[amenity=toilets][female=~/yes|only|designated/][male=no] {
icon-image: url('amenity_toilets_women.png');
}
*[amenity=toilets][male=~/yes|only|designated/][!female],
*[amenity=toilets][male=~/yes|only|designated/][female=no] {
icon-image: url('amenity_toilets_men.png');
}
*[amenity=toilets][wheelchair=~/yes|only|designated/] {
icon-image: url('amenity_toilets_disabled.png');
}
/****************************************************************************
* Shops
*/
*[shop] {
icon-image: url('shopping_$[shop].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
opacity: 1;
text: name;
}
*[shop][!name][brand] {
text: brand;
}
area[shop] {
fill-color: #FFDAAD;
fill-opacity: 1;
}
/** Store departements **/
*[department] {
fill-color: #FFCFCC;
color: #D29494;
fill-opacity: 1;
z-index: -4;
opacity: 1;
width: 0.5;
}
*[department=store_section][vending] {
icon-image: url('vending_$[vending].png');
icon-image-aliases: '"news_papers": "newspapers", "drinks": "drink", "vegetables": "vegetable"');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
......@@ -36,6 +141,19 @@ meta {
* Tourism-related objects
*/
*[tourism=~/aquarium|artwork|attraction|gallery|hostel|hotel|motel|museum/],
*[information=~/office|map/] {
icon-image: url('tourism_$[tourism].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
color: #BF9962;
fill-color: #FFF6AD;
opacity: 1;
fill-opacity: 1;
text: name;
}
/** Glass cabinet **/
*[indoor=glass_cabinet] {
color: #A2CCC8;
......@@ -45,3 +163,49 @@ meta {
weight: 2;
z-index: -1;
}
/** Information office **/
*[information=office] {
color: #7583D9;
opacity: 1;
icon-image: url('information_office.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
text: name;
}
/** Historic elements **/
*[historic] {
color: #C0B0A2;
opacity: 0.5;
width: 0.5;
fill-color: #C0B0A2;
z-index: -1;
text: name;
}
*[historic=tomb] {
icon-image: url('historic_tomb.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
/** Grass **/
area[landuse=grass],
relation[type=multipolygon][landuse=grass] {
opacity: 0;
width: 0;
fill-color: #CFECA8;
fill-opacity: 1;
z-index: -1;
}
/** Charging bike **/
*[generator:type=bicycle] {
icon-image: url('generator_type_bicycle.png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
......@@ -8,16 +8,17 @@ meta {
* Labels
*/
*[name] {
*[name],
*[ref] {
font-family: Arial;
font-size: 12;
font-weight: bold;
text-color: black;
text-offset: 6; /** Half of the font-size **/
text: name;
}
line[name] {
line[name],
line[ref] {
text-position: line;
}
......@@ -26,6 +27,27 @@ line[name] {
* Indoor structures
*/
/*
* Labelled features
*/
*[indoor][ref],
*[buildingpart][ref],
*[room][ref] {
text: ref;
}
*[indoor][name],
*[buildingpart][name],
*[room][name],
*[public_transport=platform][name],
*[railway=platform][name],
area[highway][name],
relation[type=multipolygon][highway][name] {
text: name;
}
/*
* Surface of objects
*/
......@@ -57,12 +79,14 @@ area[room=~/corridor|hall|entry|gallery|collection|entrance/],
area[highway=~/pedestrian|footway|corridor/],
area[railway=platform],
area[public_transport=platform],
area[shop=mall],
relation[type=multipolygon][indoor=~/area|corridor/],
relation[type=multipolygon][buildingpart=~/corridor|hall/],
relation[type=multipolygon][room=~/corridor|hall|entry|gallery|collection|entrance/],
relation[type=multipolygon][highway=~/pedestrian|footway|corridor/],
relation[type=multipolygon][railway=platform],
relation[type=multipolygon][public_transport=platform] {
relation[type=multipolygon][public_transport=platform],
relation[type=multipolygon][shop=mall] {
fill-color: #EEEEEE;
fill-opacity: 1;
z-index: -6;
......@@ -344,3 +368,14 @@ way[railway=~/rail|subway|light_rail|monorail|narrow_gauge|tram/] {
icon-opacity: 1;
}
/****************************************************************************
* Aeroways
*/
*[aeroway] {
icon-image: url('aeroway_$[aeroway].png');
icon-width: 24;
icon-height: 24;
icon-opacity: 1;
}
......@@ -32,3 +32,9 @@ node, way {
line {
text-position: line;
}
/** Vending machine icons **/
*[vending] {
icon-image: url('vending_$[vending].png');
icon-image-aliases: '"news_papers": "newspapers"';
}
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