From 64d313beeab7f3dca90831dfd8dc0cbca240d83f Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Tue, 27 May 2014 20:06:06 -0400 Subject: more poi labels and icons --- bin/style.js | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 169 insertions(+), 19 deletions(-) (limited to 'bin') diff --git a/bin/style.js b/bin/style.js index 1dbe2b2cf7..d323904362 100644 --- a/bin/style.js +++ b/bin/style.js @@ -800,10 +800,29 @@ module.exports = { "layer": "poi_label", "icon": "maki", "field": "scalerank", - "value": [1, 2, 3], + "value": [1, 2], "size": 12, "type": "point" }, + "poi_3": { + "source": "outdoors", + "layer": "poi_label", + "icon": "maki", + "field": "scalerank", + "value": 3, + "size": 12, + "type": "point" + }, + "poi_4": { + "source": "outdoors", + "layer": "poi_label", + "icon": "maki", + "field": "scalerank", + "value": 4, + "size": 12, + "type": "point" + }, + "poi_aerodrome": { "source": "outdoors", "layer": "poi_label", @@ -813,7 +832,7 @@ module.exports = { "size": 24, "type": "point" }, - "poi_label": { + "poi_label_1-2": { "source": "outdoors", "layer": "poi_label", "field": "scalerank", @@ -827,7 +846,33 @@ module.exports = { "fontSize": 12, "feature_type": "point", "type": "text", - "alwaysVisible": true + //"alwaysVisible": true + }, + "poi_label_3": { + "source": "outdoors", + "layer": "poi_label", + "field": "scalerank", + "value": 3, + "text_field": "name", + "path": "horizontal", + "padding": 2, + "fontSize": 12, + "feature_type": "point", + "type": "text", + //"alwaysVisible": true + }, + "poi_label_4": { + "source": "outdoors", + "layer": "poi_label", + "field": "scalerank", + "value": 4, + "text_field": "name", + "path": "horizontal", + "padding": 2, + "fontSize": 12, + "feature_type": "point", + "type": "text", + //"alwaysVisible": true } }, "structure": [ @@ -1299,10 +1344,6 @@ module.exports = { "name": "place_label_other", "bucket": "place_label_other" }, - { - "name": "poi_label", - "bucket": "poi_label" - }, { "name": "road_label", "bucket": "road_label" @@ -1319,14 +1360,35 @@ module.exports = { "name": "waterway_label", "bucket": "waterway_label" }, + { + "name": "poi_aerodrome", + "bucket": "poi_aerodrome" + }, { "name": "poi", "bucket": "poi" }, { - "name": "poi_aerodrome", - "bucket": "poi_aerodrome" - } + "name": "poi_label_1-2", + "bucket": "poi_label_1-2" + }, + { + "name": "poi_3", + "bucket": "poi_3" + }, + { + "name": "poi_label_3", + "bucket": "poi_label_3" + }, + { + "name": "poi_4", + "bucket": "poi_4" + }, + { + "name": "poi_label_4", + "bucket": "poi_label_4" + }, + ], "constants": { "land": "rgb(244,239,225)", @@ -2129,7 +2191,7 @@ module.exports = { "stroke": "rgba(255,255,255,0.5)", "size": [ "stops", - {"z": 6, "val": 14}, + {"z": 2, "val": 14}, {"z": 12, "val": 24} ] }, @@ -2275,14 +2337,58 @@ module.exports = { //"strokeWidth": 0.4, //"strokeBlur": 2 }, - "poi_label": { + "poi_3": { + "antialias": false, + "opacity": [ + "stops", + {"z": 0, "val": 0}, + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] + }, + "poi_4": { + "antialias": false, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ] + }, + "poi_label_1-2": { "color": "#444", - "size": 10, + "size": 11, "stroke": "land", - "strokeWidth": 0.6, - "strokeBlur": 2, + "strokeWidth": 0.3, + "strokeBlur": 1, "translate": [0, 14] }, + "poi_label_3": { + "color": "#444", + "size": 10, + "stroke": "land", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14], + "opacity": [ + "stops", + {"z": 0, "val": 0}, + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] + }, + "poi_label_4": { + "color": "#444", + "size": 10, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ], + "stroke": "land", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14] + }, "poi_aerodrome": { "opacity": ["stops", {"z": 13, "val": 0}, @@ -2838,7 +2944,7 @@ module.exports = { "stroke": "text_stroke_night", "size": [ "stops", - {"z": 6, "val": 14}, + {"z": 1, "val": 14}, {"z": 12, "val": 24} ] }, @@ -2982,14 +3088,58 @@ module.exports = { "color": "white", "antialias": false }, - "poi_label": { + "poi_3": { + "antialias": false, + "opacity": [ + "stops", + {"z": 0, "val": 0}, + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] + }, + "poi_4": { + "antialias": false, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ] + }, + "poi_label_1-2": { "color": "#fff", - "size": 10, + "size": 11, "stroke": "text2_stroke_night", "strokeWidth": 0.3, - "strokeBlur": 2, + "strokeBlur": 1, "translate": [0, 14] }, + "poi_label_3": { + "color": "#fff", + "size": 10, + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14], + "opacity": [ + "stops", + {"z": 0, "val": 0}, + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] + }, + "poi_label_4": { + "color": "#fff", + "size": 10, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ], + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14] + }, "poi_aerodrome": { "opacity": ["stops", {"z": 13, "val": 0}, -- cgit v1.2.1 From f8e69c58cc7595c8d790514bd5f62685520bb906 Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Tue, 27 May 2014 20:14:57 -0400 Subject: updated poi label bucket textSize to be consistent with sizes in the classes --- bin/style.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/style.js b/bin/style.js index d323904362..842690201c 100644 --- a/bin/style.js +++ b/bin/style.js @@ -843,7 +843,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "fontSize": 12, + "fontSize": 11, "feature_type": "point", "type": "text", //"alwaysVisible": true @@ -856,7 +856,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "fontSize": 12, + "fontSize": 10, "feature_type": "point", "type": "text", //"alwaysVisible": true @@ -869,7 +869,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "fontSize": 12, + "fontSize": 10, "feature_type": "point", "type": "text", //"alwaysVisible": true -- cgit v1.2.1 From bb825363e008c2ec612250677ef43f216aabef4e Mon Sep 17 00:00:00 2001 From: Eden Halperin Date: Wed, 28 May 2014 10:41:51 -0700 Subject: formatting cleanup --- bin/style.js | 154 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 71 insertions(+), 83 deletions(-) (limited to 'bin') diff --git a/bin/style.js b/bin/style.js index 842690201c..bfe51d0d47 100644 --- a/bin/style.js +++ b/bin/style.js @@ -822,7 +822,6 @@ module.exports = { "size": 12, "type": "point" }, - "poi_aerodrome": { "source": "outdoors", "layer": "poi_label", @@ -845,8 +844,7 @@ module.exports = { "padding": 2, "fontSize": 11, "feature_type": "point", - "type": "text", - //"alwaysVisible": true + "type": "text" }, "poi_label_3": { "source": "outdoors", @@ -858,8 +856,7 @@ module.exports = { "padding": 2, "fontSize": 10, "feature_type": "point", - "type": "text", - //"alwaysVisible": true + "type": "text" }, "poi_label_4": { "source": "outdoors", @@ -871,8 +868,7 @@ module.exports = { "padding": 2, "fontSize": 10, "feature_type": "point", - "type": "text", - //"alwaysVisible": true + "type": "text" } }, "structure": [ @@ -2331,28 +2327,23 @@ module.exports = { "stroke": "text_stroke" }, "poi": { - //"color": "rgba(50,50,50,0.9)", "antialias": false - //"stroke": #000, - //"strokeWidth": 0.4, - //"strokeBlur": 2 }, "poi_3": { - "antialias": false, - "opacity": [ - "stops", - {"z": 0, "val": 0}, - {"z": 16.5, "val": 0}, - {"z": 16.75, "val": 1} - ] + "antialias": false, + "opacity": [ + "stops", + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] }, "poi_4": { - "antialias": false, - "opacity": [ - "stops", - {"z": 18.5, "val": 0}, - {"z": 18.75, "val": 1} - ] + "antialias": false, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ] }, "poi_label_1-2": { "color": "#444", @@ -2363,31 +2354,30 @@ module.exports = { "translate": [0, 14] }, "poi_label_3": { - "color": "#444", - "size": 10, - "stroke": "land", - "strokeWidth": 0.3, - "strokeBlur": 1, - "translate": [0, 14], - "opacity": [ - "stops", - {"z": 0, "val": 0}, - {"z": 16.5, "val": 0}, - {"z": 16.75, "val": 1} - ] + "color": "#444", + "size": 10, + "stroke": "land", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14], + "opacity": [ + "stops", + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] }, "poi_label_4": { - "color": "#444", - "size": 10, - "opacity": [ - "stops", - {"z": 18.5, "val": 0}, - {"z": 18.75, "val": 1} - ], - "stroke": "land", - "strokeWidth": 0.3, - "strokeBlur": 1, - "translate": [0, 14] + "color": "#444", + "size": 10, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ], + "stroke": "land", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14] }, "poi_aerodrome": { "opacity": ["stops", @@ -3089,21 +3079,20 @@ module.exports = { "antialias": false }, "poi_3": { - "antialias": false, - "opacity": [ - "stops", - {"z": 0, "val": 0}, - {"z": 16.5, "val": 0}, - {"z": 16.75, "val": 1} - ] + "antialias": false, + "opacity": [ + "stops", + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] }, "poi_4": { - "antialias": false, - "opacity": [ - "stops", - {"z": 18.5, "val": 0}, - {"z": 18.75, "val": 1} - ] + "antialias": false, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ] }, "poi_label_1-2": { "color": "#fff", @@ -3114,31 +3103,30 @@ module.exports = { "translate": [0, 14] }, "poi_label_3": { - "color": "#fff", - "size": 10, - "stroke": "text2_stroke_night", - "strokeWidth": 0.3, - "strokeBlur": 1, - "translate": [0, 14], - "opacity": [ - "stops", - {"z": 0, "val": 0}, - {"z": 16.5, "val": 0}, - {"z": 16.75, "val": 1} - ] + "color": "#fff", + "size": 10, + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14], + "opacity": [ + "stops", + {"z": 16.5, "val": 0}, + {"z": 16.75, "val": 1} + ] }, "poi_label_4": { - "color": "#fff", - "size": 10, - "opacity": [ - "stops", - {"z": 18.5, "val": 0}, - {"z": 18.75, "val": 1} - ], - "stroke": "text2_stroke_night", - "strokeWidth": 0.3, - "strokeBlur": 1, - "translate": [0, 14] + "color": "#fff", + "size": 10, + "opacity": [ + "stops", + {"z": 18.5, "val": 0}, + {"z": 18.75, "val": 1} + ], + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 1, + "translate": [0, 14] }, "poi_aerodrome": { "opacity": ["stops", -- cgit v1.2.1 From c6c978f82233b5ad9401aa73f3e3dab6fd588cb7 Mon Sep 17 00:00:00 2001 From: Eden Halperin Date: Wed, 28 May 2014 11:48:51 -0700 Subject: fix country label size discrepancy --- bin/style.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'bin') diff --git a/bin/style.js b/bin/style.js index bfe51d0d47..94abd2e65c 100644 --- a/bin/style.js +++ b/bin/style.js @@ -1642,6 +1642,11 @@ module.exports = { {"z": 19, "val": 12}, {"z": 20, "val": 24}, {"z": 21, "val": 48} + ], + "country_label_size": [ + "stops", + {"z": 1, "val": 14}, + {"z": 12, "val": 24} ] }, "classes": [ @@ -2185,11 +2190,7 @@ module.exports = { "country_label": { "color": "country_text", "stroke": "rgba(255,255,255,0.5)", - "size": [ - "stops", - {"z": 2, "val": 14}, - {"z": 12, "val": 24} - ] + "size": "country_label_size" }, "country_label_line": { "color": "country_text", @@ -2932,11 +2933,7 @@ module.exports = { "country_label": { "color": "text_night", "stroke": "text_stroke_night", - "size": [ - "stops", - {"z": 1, "val": 14}, - {"z": 12, "val": 24} - ] + "size": "country_label_size" }, "country_label_line": { "color": "text_night", -- cgit v1.2.1