diff options
author | Nicki Dlugash <nicki@mapbox.com> | 2014-06-02 17:38:44 -0400 |
---|---|---|
committer | Nicki Dlugash <nicki@mapbox.com> | 2014-06-02 17:38:44 -0400 |
commit | 370c2e1d456bfdf43019cfe7c84d6687c28c9ceb (patch) | |
tree | 9b7d2c3cbe4f56801a0163ef0cc0172060f6e942 /bin | |
parent | 3c26f53e63e7e3a9ff9973ebc3d99b39488b0251 (diff) | |
download | qtlocation-mapboxgl-370c2e1d456bfdf43019cfe7c84d6687c28c9ceb.tar.gz |
separating scalerank 4 pois by localrank
Diffstat (limited to 'bin')
-rw-r--r-- | bin/style.js | 161 |
1 files changed, 124 insertions, 37 deletions
diff --git a/bin/style.js b/bin/style.js index 6e17b33381..6e7a0306f4 100644 --- a/bin/style.js +++ b/bin/style.js @@ -932,12 +932,28 @@ module.exports = { "size": 12, "type": "point" }, - "poi_4": { + "poi_4_4": { "source": "outdoors", "layer": "poi_label", "icon": "maki", - "field": "scalerank", - "value": 4, + "filter": [ + "and", + { "field": "scalerank", "value": 4 }, + { "field": "localrank", "operator": "<=", "value": 4 } + ], + "size": 12, + "type": "point" + }, + "poi_4_16": { + "source": "outdoors", + "layer": "poi_label", + "icon": "maki", + "filter": [ + "and", + { "field": "scalerank", "value": 4 }, + { "field": "localrank", "operator": "<=", "value": 16 }, + { "field": "localrank", "operator": ">", "value": 4 } + ], "size": 12, "type": "point" }, @@ -977,7 +993,7 @@ module.exports = { "text_field": "{{name_en}}", "path": "horizontal", "padding": 2, - "maxWidth": 10, + "maxWidth": 8, "verticalAlignment": "top", "translate": [0, -1], "font": "Open Sans Semibold, Arial Unicode MS Bold", @@ -985,15 +1001,38 @@ module.exports = { "feature_type": "point", "type": "text", }, - "poi_label_4": { + "poi_label_4_4": { "source": "outdoors", "layer": "poi_label", - "field": "scalerank", - "value": 4, + "filter": [ + "and", + { "field": "scalerank", "value": 4 }, + { "field": "localrank", "operator": "<=", "value": 4 } + ], "text_field": "{{name_en}}", "path": "horizontal", "padding": 2, - "maxWidth": 10, + "maxWidth": 8, + "verticalAlignment": "top", + "translate": [0, -1], + "font": "Open Sans Semibold, Arial Unicode MS Bold", + "fontSize": 10, + "feature_type": "point", + "type": "text", + }, + "poi_label_4_16": { + "source": "outdoors", + "layer": "poi_label", + "filter": [ + "and", + { "field": "scalerank", "value": 4 }, + { "field": "localrank", "operator": "<=", "value": 16 }, + { "field": "localrank", "operator": ">", "value": 4 } + ], + "text_field": "{{name_en}}", + "path": "horizontal", + "padding": 2, + "maxWidth": 8, "verticalAlignment": "top", "translate": [0, -1], "font": "Open Sans Semibold, Arial Unicode MS Bold", @@ -1484,28 +1523,12 @@ module.exports = { "bucket": "place_label_other" }, { - "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", - "bucket": "contour_label" - }, - { "name": "water_label", "bucket": "water_label" }, { - "name": "waterway_label", - "bucket": "waterway_label" + "name": "poi_aerodrome", + "bucket": "poi_aerodrome" }, { "name": "poi", @@ -1516,6 +1539,10 @@ module.exports = { "bucket": "poi_label_1-2" }, { + "name": "road_label_1", + "bucket": "road_label_1" + }, + { "name": "poi_3", "bucket": "poi_3" }, @@ -1524,16 +1551,36 @@ module.exports = { "bucket": "poi_label_3" }, { - "name": "poi_4", - "bucket": "poi_4" + "name": "road_label_2", + "bucket": "road_label_2" }, { - "name": "poi_label_4", - "bucket": "poi_label_4" + "name": "road_label_3", + "bucket": "road_label_3" }, { - "name": "poi_aerodrome", - "bucket": "poi_aerodrome" + "name": "contour_label", + "bucket": "contour_label" + }, + { + "name": "waterway_label", + "bucket": "waterway_label" + }, + { + "name": "poi_4_4", + "bucket": "poi_4_4" + }, + { + "name": "poi_label_4_4", + "bucket": "poi_label_4_4" + }, + { + "name": "poi_4_16", + "bucket": "poi_4_16" + }, + { + "name": "poi_label_4_16", + "bucket": "poi_label_4_16" } ], "constants": { @@ -2595,7 +2642,15 @@ module.exports = { {"z": 16.75, "val": 1} ] }, - "poi_4": { + "poi_4_4": { + "antialias": false, + "opacity": [ + "stops", + {"z": 17.5, "val": 0}, + {"z": 17.75, "val": 1} + ] + }, + "poi_4_16": { "antialias": false, "opacity": [ "stops", @@ -2622,12 +2677,24 @@ module.exports = { {"z": 16.75, "val": 1} ] }, - "poi_label_4": { + "poi_label_4_4": { "color": "#444", "size": 10, "opacity": [ "stops", - {"z": 18.5, "val": 0}, + {"z": 17.5, "val": 0}, + {"z": 17.75, "val": 1} + ], + "stroke": "land", + "strokeWidth": 0.3, + "strokeBlur": 1, + }, + "poi_label_4_16": { + "color": "#444", + "size": 10, + "opacity": [ + "stops", + {"z": 18.25, "val": 0}, {"z": 18.75, "val": 1} ], "stroke": "land", @@ -3402,7 +3469,15 @@ module.exports = { {"z": 16.75, "val": 1} ] }, - "poi_4": { + "poi_4_4": { + "antialias": false, + "opacity": [ + "stops", + {"z": 17.5, "val": 0}, + {"z": 17.75, "val": 1} + ] + }, + "poi_4_16": { "antialias": false, "opacity": [ "stops", @@ -3429,7 +3504,19 @@ module.exports = { {"z": 16.75, "val": 1} ] }, - "poi_label_4": { + "poi_label_4_4": { + "color": "#fff", + "size": 10, + "opacity": [ + "stops", + {"z": 17.5, "val": 0}, + {"z": 17.75, "val": 1} + ], + "stroke": "text2_stroke_night", + "strokeWidth": 0.3, + "strokeBlur": 1 + }, + "poi_label_4_16": { "color": "#fff", "size": 10, "opacity": [ |