Skip to content

Commit

Permalink
Merge pull request #323 from matkoniecz/cinnabar-update
Browse files Browse the repository at this point in the history
update cinnabar style to 7.0.1
  • Loading branch information
westnordost authored Jun 14, 2017
2 parents 22599d3 + 3e35ba2 commit f4abb97
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,14 @@ textures:

sources:
mapzen:
type: MVT
url: http://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt
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
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)
Expand Down Expand Up @@ -817,7 +823,6 @@ styles:
icons:
base: points
texture: pois
interactive: global.sdk_interactive
blend_order: 1
text-blend-order:
base: text
Expand All @@ -838,25 +843,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:
Expand Down Expand Up @@ -899,13 +900,15 @@ 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]]
mz_route_line_dash:
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]]
Expand All @@ -916,6 +919,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]]
Expand Down Expand Up @@ -1116,13 +1120,15 @@ layers:
data: { source: mz_default_line }
draw:
sdk-line-overlay:
interactive: global.sdk_interactive
color: black
order: 503
width: 3px
mz_default_polygon:
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:
Expand Down Expand Up @@ -3715,31 +3721,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:
Expand Down Expand Up @@ -5385,6 +5366,8 @@ layers:
draw:
polygons:
order: global.feature_order
lines:
order: global.feature_order

landuse-labels:
filter:
Expand Down Expand Up @@ -5869,6 +5852,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:
Expand Down Expand Up @@ -5902,6 +5886,7 @@ layers:
color: global.grey11
outline:
style: lines
order: global.feature_order
color: global.grey11_o
width: [[14,0px],[15,1px],[16,0.5m]]

Expand Down Expand Up @@ -5954,6 +5939,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:
Expand All @@ -5969,6 +5955,7 @@ layers:
visible: true
outline:
style: lines
order: global.feature_order
color: global.green11_o
width: [[14,0px],[15,1px],[16,0.5m]]

Expand All @@ -5982,6 +5969,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:
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/scene.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import:
- streetcomplete.yaml
- cinnabar-style-7.0.0.yaml
- cinnabar-style-7.0.1.yaml

4 comments on commit f4abb97

@Binnette
Copy link
Contributor

@Binnette Binnette commented on f4abb97 Jun 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiles are not loading anymore on my device and in android simulator.
May be we send a wrong API key to mapzen ?

When I restore the previous url, tiles are loaded immediately.
/app/src/main/assets/cinnabar-style-7.0.1.yaml
Line 724
- url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson
+ url: http://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.mvt

I also tried to use HTTP instead of HTTPS. But it's not working with HTTP

@westnordost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opps, @matkoniecz changed the type back to MVT but did not correct the URL to use mvt. Also, https is used. https has been causing problems for certain Android devices.

@Binnette
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. It is working again with :
type: TopoJSON #GeoJSON, MVT, TopoJSON and
url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson

@matkoniecz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, sorry for missing this.

@Binnette Now also master should work as #328 is merged.

Please sign in to comment.