From 8d7be8148614d7847626d3f8d6f5e92d735f64fa Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 13 Jun 2017 12:23:16 +0200 Subject: [PATCH 1/2] update cinnabar style to 7.0.1 fixes part of #199 --- ...e-7.0.0.yaml => cinnabar-style-7.0.1.yaml} | 74 +++++++++++-------- app/src/main/assets/scene.yaml | 2 +- 2 files changed, 43 insertions(+), 33 deletions(-) rename app/src/main/assets/{cinnabar-style-7.0.0.yaml => cinnabar-style-7.0.1.yaml} (99%) diff --git a/app/src/main/assets/cinnabar-style-7.0.0.yaml b/app/src/main/assets/cinnabar-style-7.0.1.yaml similarity index 99% rename from app/src/main/assets/cinnabar-style-7.0.0.yaml rename to app/src/main/assets/cinnabar-style-7.0.1.yaml index f479af9977..e6fa9d84ef 100644 --- a/app/src/main/assets/cinnabar-style-7.0.0.yaml +++ b/app/src/main/assets/cinnabar-style-7.0.1.yaml @@ -718,8 +718,12 @@ textures: sources: mapzen: - type: MVT - url: http://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt + type: TopoJSON #GeoJSON, MVT, TopoJSON + url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson + #url: '//tile.dev.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson' + #url: //localhost:8080/vector/all/{z}/{x}/{y}.json + url_params: + api_key: global.sdk_mapzen_api_key max_zoom: 16 # # Only enable this for local debug, should not be enabled for prod (app inserts these at runtime) @@ -817,7 +821,6 @@ styles: icons: base: points texture: pois - interactive: global.sdk_interactive blend_order: 1 text-blend-order: base: text @@ -838,25 +841,21 @@ styles: ux-location-gem-overlay: base: points texture: pois - interactive: global.sdk_interactive blend: overlay blend_order: 2 ux-icons-overlay: base: points texture: pois - interactive: global.sdk_interactive blend: overlay blend_order: 3 sdk-point-overlay: base: points texture: pois - interactive: global.sdk_interactive blend: overlay blend_order: 3 sdk-shield-overlay: base: points texture: pois - interactive: global.sdk_interactive blend: overlay blend_order: 3 sdk-line-overlay: @@ -899,6 +898,7 @@ layers: data: { source: mz_route_line } draw: ux-route-line-overlay: + interactive: global.sdk_interactive color: black order: 500 width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]] @@ -906,6 +906,7 @@ layers: data: { source: mz_dash_line } draw: ux-route-line-dash-overlay: + interactive: global.sdk_interactive color: '#06a6d4' order: 500 width: [[2,2px],[5,2.5px],[11,3px],[16,7px],[17,9px]] @@ -916,6 +917,7 @@ layers: # each transit route segment could be a different "line" each with it's own color # but some transit lines don't define a color, in those cases default to blue # and since the color is coming from Transit.land they call it "color" instead of "colour" + interactive: global.sdk_interactive color: function() { return feature.color || '#06a6d4'; } order: 500 width: [[0,3.5px],[5,5px],[9,7px],[10,6px],[11,6px],[13,8px],[14,9px],[15,10px],[16,11px],[17,12px],[18,10px]] @@ -1116,6 +1118,7 @@ layers: data: { source: mz_default_line } draw: sdk-line-overlay: + interactive: global.sdk_interactive color: black order: 503 width: 3px @@ -1123,6 +1126,7 @@ layers: data: { source: mz_default_polygon } draw: sdk-polygon-overlay: + interactive: global.sdk_interactive color: [0.,0.,0.,0.4] #'#06b1e2' order: 501 sdk-line-overlay: @@ -3715,31 +3719,6 @@ layers: transform: uppercase stroke: { color: global.earth1, width: 3px } - city_walls: - filter: { kind: city_wall } - draw: - lines: - color: global.city_wall - width: [[12, 0.75px], [13, 1.0px], [14, 1.2px], [15, 2.0px], [16, 2.5px], [19, 6m]] - retaining_wall: - filter: { kind: retaining_wall } - draw: - lines: - color: global.retaining_wall - width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 4m]] - fence: - filter: { kind: fence } - draw: - lines: - color: global.fence - width: [[16, 0px], [17, 1px], [18, 1.5px], [20, 0.5m]] - snow_fence: - filter: { kind: snow_fence } - draw: - lines: - color: global.snow_fence - width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 4m]] - places: data: { source: mapzen, layer: places } filter: @@ -5385,6 +5364,8 @@ layers: draw: polygons: order: global.feature_order + lines: + order: global.feature_order landuse-labels: filter: @@ -5869,6 +5850,7 @@ layers: color: global.orange2 outline: style: lines + order: global.feature_order color: global.green6 width: [[14,0px],[15,1px],[16,1m]] place_of_worship: @@ -5902,6 +5884,7 @@ layers: color: global.grey11 outline: style: lines + order: global.feature_order color: global.grey11_o width: [[14,0px],[15,1px],[16,0.5m]] @@ -5954,6 +5937,7 @@ layers: visible: true outline: style: lines + order: global.feature_order color: global.grey12_o width: [[14,0px],[15,1px],[16,0.5m]] minor-zoo-landuse: @@ -5969,6 +5953,7 @@ layers: visible: true outline: style: lines + order: global.feature_order color: global.green11_o width: [[14,0px],[15,1px],[16,0.5m]] @@ -5982,6 +5967,31 @@ layers: order: global.feature_order color: [[0, global.earth2_e],[6, global.earth2_e2],[8, global.earth2_e3]] + city_walls: + filter: { kind: city_wall } + draw: + lines: + color: global.city_wall + width: [[12, 0.75px], [13, 1.0px], [14, 1.2px], [15, 2.0px], [16, 2.5px], [19, 5m]] + retaining_wall: + filter: { kind: retaining_wall } + draw: + lines: + color: global.retaining_wall + width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 3m]] + fence: + filter: { kind: fence } + draw: + lines: + color: global.fence + width: [[16, 0px], [17, 1px], [18, 1.5px], [20, 0.5m]] + snow_fence: + filter: { kind: snow_fence } + draw: + lines: + color: global.snow_fence + width: [[14, 0.5px], [15, 1.0px], [16, 1.5px], [17, 2.0px], [19, 2m]] + # transit-bus-roads: # data: { source: mapzen, layer: roads } # filter: diff --git a/app/src/main/assets/scene.yaml b/app/src/main/assets/scene.yaml index 819f66ff2a..f210eced13 100644 --- a/app/src/main/assets/scene.yaml +++ b/app/src/main/assets/scene.yaml @@ -1,3 +1,3 @@ import: - streetcomplete.yaml - - cinnabar-style-7.0.0.yaml + - cinnabar-style-7.0.1.yaml From 3e35ba2b467a1753fd57874740bc261f461e9076 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Wed, 14 Jun 2017 09:14:39 +0200 Subject: [PATCH 2/2] switch back to MVT, add note why MVT is used --- app/src/main/assets/cinnabar-style-7.0.1.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/assets/cinnabar-style-7.0.1.yaml b/app/src/main/assets/cinnabar-style-7.0.1.yaml index e6fa9d84ef..426b8842c7 100644 --- a/app/src/main/assets/cinnabar-style-7.0.1.yaml +++ b/app/src/main/assets/cinnabar-style-7.0.1.yaml @@ -718,7 +718,9 @@ textures: sources: mapzen: - type: TopoJSON #GeoJSON, MVT, TopoJSON + type: MVT #GeoJSON, MVT, TopoJSON + #binary MVT format is used in StreetComplete as it is recommended for mobile + #https://mapzen.com/documentation/vector-tiles/) url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson #url: '//tile.dev.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson' #url: //localhost:8080/vector/all/{z}/{x}/{y}.json