From 3c00a71a7bf4ca98b748946ac8909e1af6c66bba Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Wed, 28 May 2014 16:18:06 -0400 Subject: [PATCH 1/4] removed city dot styles, updated strokeWidth and strokeBlur properties for place labels, fixed night style admin marine cover color --- bin/style.js | 66 ++++++++++++++-------------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/bin/style.js b/bin/style.js index bc548ac29..a24a8e9ba 100644 --- a/bin/style.js +++ b/bin/style.js @@ -709,14 +709,6 @@ module.exports = { "type": "text", "enabled": 4 }, - "place_label_city_point": { - "source": "outdoors", - "layer": "place_label", - "field": "type", - "value": "city", - "type": "point", - "size": 4 - }, "place_label_city": { "source": "outdoors", "layer": "place_label", @@ -1279,10 +1271,6 @@ module.exports = { "name": "state_label", "bucket": "state_label" }, - { - "name": "place_label_city_point", - "bucket": "place_label_city_point" - }, { "name": "place_label_city", "bucket": "place_label_city" @@ -2131,6 +2119,7 @@ module.exports = { "country_label": { "color": "country_text", "stroke": "rgba(255,255,255,0.5)", + "strokeWidth": 0.4, "size": [ "stops", {"z": 6, "val": 14}, @@ -2194,9 +2183,6 @@ module.exports = { {"z": 10, "val": 0} ] }, - "place_label_city_point": { - "color": "#4a4032" - }, "place_label_city": { "color": "#444", "strokeWidth": 0.4, @@ -2208,20 +2194,12 @@ module.exports = { {"z": 7, "val": 14}, {"z": 14.99, "val": 20}, {"z": 15, "val": 0} - ], - "translate": [ - 0, - [ - "stops", - {"z": 4, "val": 10}, - {"z": 6, "val": 30}, - {"z": 7, "val": 0} - ] ] }, "place_label_town": { "color": "#716656", - "strokeWidth": 0.5, + "strokeWidth": 0.3, + "strokeBlur": 2, "stroke": "text_stroke", "size": [ "stops", @@ -2233,7 +2211,8 @@ module.exports = { }, "place_label_village": { "color": "#635644", - "strokeWidth": 0.5, + "strokeWidth": 0.3, + "strokeBlur": 2, "stroke": "text_stroke", "size": [ "stops", @@ -2299,7 +2278,7 @@ module.exports = { "color": "land_night" }, "admin_maritime_cover": { - "color": "#0a1347", + "color": "water_night", "width": 5 }, "admin_maritime": { @@ -2839,7 +2818,8 @@ module.exports = { }, "country_label": { "color": "text_night", - "stroke": "text_stroke_night", + "stroke": "text2_stroke_night", + "strokeWidth": 0.4, "size": [ "stops", {"z": 6, "val": 14}, @@ -2903,13 +2883,10 @@ module.exports = { {"z": 10, "val": 0} ] }, - "place_label_city_point": { - "color": "#ddd" - }, "place_label_city": { "color": "#fff", "strokeWidth": 0.4, - "stroke": "text_stroke_night", + "stroke": "text2_stroke_night", "size": [ "stops", {"z": 3.99, "val": 0}, @@ -2917,21 +2894,13 @@ module.exports = { {"z": 7, "val": 14}, {"z": 14.99, "val": 20}, {"z": 15, "val": 0} - ], - "translate": [ - 0, - [ - "stops", - {"z": 4, "val": 10}, - {"z": 6, "val": 30}, - {"z": 7, "val": 0} - ] ] }, "place_label_town": { "color": "text_night", - "strokeWidth": 0.5, - "stroke": "text_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 2, + "stroke": "text2_stroke_night", "size": [ "stops", {"z": 9, "val": 10}, @@ -2942,8 +2911,9 @@ module.exports = { }, "place_label_village": { "color": "text_night", - "strokeWidth": 0.5, - "stroke": "text_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 2, + "stroke": "text2_stroke_night", "size": [ "stops", {"z": 9, "val": 8}, @@ -2955,9 +2925,9 @@ module.exports = { }, "place_label_other": { "color": "text_night", - "stroke": "text_stroke_night", - "strokeWidth": 0.5, - "strokeBlur": 3, + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 2, "size": [ "stops", {"z": 0, "val": 10}, From 7dadaa8d2287dcdde041099239676acb29c32cde Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Wed, 28 May 2014 16:37:50 -0400 Subject: [PATCH 2/4] fixed duplicate size property in country label --- bin/style.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/style.js b/bin/style.js index 5d8bff900..e77c716aa 100644 --- a/bin/style.js +++ b/bin/style.js @@ -2921,11 +2921,6 @@ module.exports = { "color": "text_night", "stroke": "text2_stroke_night", "strokeWidth": 0.4, - "size": [ - "stops", - {"z": 6, "val": 14}, - {"z": 12, "val": 24} - ] "size": "country_label_size" }, "country_label_line": { From e2a55e440c83af17598622b88b863b196b36388e Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Wed, 28 May 2014 19:28:22 -0400 Subject: [PATCH 3/4] divided road labels into 3 buckets. Made road labels and neighborhood/suburb/hamlet labels larger - same size as in original carto version. --- bin/style.js | 119 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 99 insertions(+), 20 deletions(-) diff --git a/bin/style.js b/bin/style.js index e77c716aa..bd0db18a0 100644 --- a/bin/style.js +++ b/bin/style.js @@ -753,17 +753,45 @@ module.exports = { ], "text_field": "name", "path": "horizontal", - "fontSize": 14, + "fontSize": 18, "feature_type": "point", "type": "text" }, - "road_label": { + "road_label_1": { "source": "outdoors", "layer": "road_label", + "field": "class", + "value": ["motorway","main"], "text_field": "name", "path": "curve", "padding": 2, - "fontSize": 13, + "fontSize": 18, + "feature_type": "line", + "type": "text", + "maxAngleDelta": 0.5 + }, + "road_label_2": { + "source": "outdoors", + "layer": "road_label", + "field": "class", + "value": ["street","street_limited"], + "text_field": "name", + "path": "curve", + "padding": 2, + "fontSize": 16, + "feature_type": "line", + "type": "text", + "maxAngleDelta": 0.5 + }, + "road_label_3": { + "source": "outdoors", + "layer": "road_label", + "field": "class", + "value": ["service","driveway","path"], + "text_field": "name", + "path": "curve", + "padding": 2, + "fontSize": 14, "feature_type": "line", "type": "text", "maxAngleDelta": 0.5 @@ -1329,8 +1357,16 @@ module.exports = { "bucket": "place_label_other" }, { - "name": "road_label", - "bucket": "road_label" + "name": "road_label_1", + "bucket": "road_label_1" + }, + { + "name": "road_label_2", + "bucket": "road_label_2" + }, + { + "name": "road_label_3", + "bucket": "road_label_3" }, { "name": "contour_label", @@ -1602,12 +1638,27 @@ module.exports = { {"z": 8, "val": 1}, {"z": 12, "val": 2} ], - "road_label_size": [ + "road_label_1_size": [ "stops", - {"z": 0, "val": 12}, + {"z": 0, "val": 11}, {"z": 14, "val": 12}, {"z": 15, "val": 13}, - {"z": 22, "val": 13} + {"z": 16, "val": 14}, + {"z": 17, "val": 16}, + {"z": 18, "val": 18} + ], + "road_label_2_size": [ + "stops", + {"z": 0, "val": 11}, + {"z": 14, "val": 12}, + {"z": 16, "val": 14}, + {"z": 18, "val": 16} + ], + "road_label_3_size": [ + "stops", + {"z": 0, "val": 10}, + {"z": 16, "val": 12}, + {"z": 18, "val": 14} ], "fence_width": [ "stops", @@ -2287,18 +2338,32 @@ module.exports = { "stroke": "text_stroke", "size": [ "stops", - {"z": 0, "val": 10}, - {"z": 14, "val": 11}, - {"z": 15, "val": 12}, - {"z": 16, "val": 14} + {"z": 0, "val": 11}, + {"z": 14, "val": 12}, + {"z": 16, "val": 14}, + {"z": 18, "val": 18} ] }, - "road_label": { + "road_label_1": { "color": "#585042", "stroke": "land", "strokeWidth": 0.6, "strokeBlur": 2, - "size": "road_label_size" + "size": "road_label_1_size" + }, + "road_label_2": { + "color": "#585042", + "stroke": "land", + "strokeWidth": 0.6, + "strokeBlur": 2, + "size": "road_label_2_size" + }, + "road_label_3": { + "color": "#585042", + "stroke": "land", + "strokeWidth": 0.6, + "strokeBlur": 2, + "size": "road_label_3_size" }, "water_label": { "color": "water_dark", @@ -3027,18 +3092,32 @@ module.exports = { "strokeBlur": 2, "size": [ "stops", - {"z": 0, "val": 10}, - {"z": 14, "val": 11}, - {"z": 15, "val": 12}, - {"z": 16, "val": 14} + {"z": 0, "val": 11}, + {"z": 14, "val": 12}, + {"z": 16, "val": 14}, + {"z": 18, "val": 18} ] }, - "road_label": { + "road_label_1": { "color": "text_night", "stroke": "text2_stroke_night", "strokeWidth": 0.5, "strokeBlur": 3, - "size": "road_label_size" + "size": "road_label_1_size" + }, + "road_label_2": { + "color": "text_night", + "stroke": "text2_stroke_night", + "strokeWidth": 0.5, + "strokeBlur": 3, + "size": "road_label_2_size" + }, + "road_label_3": { + "color": "text_night", + "stroke": "text2_stroke_night", + "strokeWidth": 0.5, + "strokeBlur": 3, + "size": "road_label_3_size" }, "water_label": { "color": "water_dark_night", From 9698ac02cf277bcf7fe98718f210578f44eae626 Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Wed, 28 May 2014 20:03:49 -0400 Subject: [PATCH 4/4] fixed all stop functions, and updated waterway and water label colors --- bin/style.js | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/bin/style.js b/bin/style.js index bd0db18a0..8f6cf7626 100644 --- a/bin/style.js +++ b/bin/style.js @@ -1640,7 +1640,7 @@ module.exports = { ], "road_label_1_size": [ "stops", - {"z": 0, "val": 11}, + {"z": 13, "val": 11}, {"z": 14, "val": 12}, {"z": 15, "val": 13}, {"z": 16, "val": 14}, @@ -1649,14 +1649,14 @@ module.exports = { ], "road_label_2_size": [ "stops", - {"z": 0, "val": 11}, + {"z": 13, "val": 11}, {"z": 14, "val": 12}, {"z": 16, "val": 14}, {"z": 18, "val": 16} ], "road_label_3_size": [ "stops", - {"z": 0, "val": 10}, + {"z": 15, "val": 10}, {"z": 16, "val": 12}, {"z": 18, "val": 14} ], @@ -2248,7 +2248,6 @@ module.exports = { "marine_label_point_1": { "color": "#a9c4c7", "size": ["stops", - {"z": 0, "val": 20}, {"z": 3, "val": 20}, {"z": 4, "val": 25}, {"z": 5, "val": 30}, @@ -2259,7 +2258,6 @@ module.exports = { "marine_label_point_2": { "color": "#a9c4c7", "size": ["stops", - {"z": 0, "val": 13}, {"z": 3, "val": 13}, {"z": 4, "val": 14}, {"z": 5, "val": 20}, @@ -2271,7 +2269,6 @@ module.exports = { "marine_label_point_other": { "color": "#a9c4c7", "size": ["stops", - {"z": 0, "val": 12}, {"z": 3, "val": 12}, {"z": 4, "val": 13}, {"z": 5, "val": 15}, @@ -2338,7 +2335,7 @@ module.exports = { "stroke": "text_stroke", "size": [ "stops", - {"z": 0, "val": 11}, + {"z": 13, "val": 11}, {"z": 14, "val": 12}, {"z": 16, "val": 14}, {"z": 18, "val": 18} @@ -2599,7 +2596,7 @@ module.exports = { "prerender-blur": 1, "opacity": [ "stops", - {"z": 0, "val": 0.3}, + {"z": 16, "val": 0.3}, {"z": 17, "val": 0.2}, {"z": 18, "val": 0.1} ] @@ -2612,7 +2609,7 @@ module.exports = { "prerender-blur": 1, "opacity": [ "stops", - {"z": 0, "val": 0.3}, + {"z": 16, "val": 0.3}, {"z": 17, "val": 0.2}, {"z": 18, "val": 0.1} ] @@ -3000,7 +2997,6 @@ module.exports = { "marine_label_point_1": { "color": "water_dark_night", "size": ["stops", - {"z": 0, "val": 20}, {"z": 3, "val": 20}, {"z": 4, "val": 25}, {"z": 5, "val": 30}, @@ -3011,7 +3007,6 @@ module.exports = { "marine_label_point_2": { "color": "water_dark_night", "size": ["stops", - {"z": 0, "val": 13}, {"z": 3, "val": 13}, {"z": 4, "val": 14}, {"z": 5, "val": 20}, @@ -3023,7 +3018,6 @@ module.exports = { "marine_label_point_other": { "color": "#a9c4c7", "size": ["stops", - {"z": 0, "val": 12}, {"z": 3, "val": 12}, {"z": 4, "val": 13}, {"z": 5, "val": 15}, @@ -3092,7 +3086,7 @@ module.exports = { "strokeBlur": 2, "size": [ "stops", - {"z": 0, "val": 11}, + {"z": 13, "val": 11}, {"z": 14, "val": 12}, {"z": 16, "val": 14}, {"z": 18, "val": 18} @@ -3121,12 +3115,13 @@ module.exports = { }, "water_label": { "color": "water_dark_night", - "stroke": "text_stroke_night" + "strokeWidth": 0.8, + "stroke": "text2_stroke_night" }, "waterway_label": { - "color": "land_night", + "color": "water_dark_night", "strokeWidth": 0.8, - "stroke": "water_night" + "stroke": "text2_stroke_night" }, "poi": { "color": "white",