Skip to content

Commit

Permalink
update style json
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Apr 10, 2024
1 parent 0399454 commit 271b092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion demo/streetcomplete-night.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"transition": { "duration": 300, "delay": 0 },
"light": { "intensity": 0.2 },
"glyphs": "https://api.jawg.io/glyphs/{fontstack}/{range}.pbf",
"sprite": "https://streetcomplete.app/map-jawg/sprites",
"layers": [
{ "id": "background", "type": "background", "paint": {"background-color": "#2e2e48"}},
{ "id": "landuse-town", "source": "jawg-streets", "source-layer": "landuse", "minzoom": 11.0, "filter": ["!", ["in", ["get", "class"], ["literal", ["pitch", "park", "grass", "cemetery", "wood", "scrub", "national_park"]]]], "type": "fill", "paint": { "fill-color": "#3d364e", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.0, 12.0, 1.0]} },
Expand Down Expand Up @@ -94,7 +95,7 @@
{ "id": "paths-bridge-private", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["in", ["get", "access"], ["literal", ["no", "private", "destination", "customers", "delivery", "agricultural", "forestry", "emergency"]]], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#3d364e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.25, 16.0, 0.5, 24.0, 128.0], "line-dasharray": [1, 2]},"layout": {"line-cap": "round", "line-join": "round"} },
{ "id": "roads-service-bridge-private", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["in", ["get", "access"], ["literal", ["no", "private", "destination", "customers", "delivery", "agricultural", "forestry", "emergency"]]], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#3d364e", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.25, 16.0, 1.5, 24.0, 384.0], "line-dasharray": [1, 2]},"layout": {"line-cap": "round", "line-join": "round"} },
{ "id": "railways-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["major_rail", "minor_rail"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#96c", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.75, 13.0, 2.0, 16.999, 4.0, 17.0, 2.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 17.0, 0.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-join": "round"} },
{ "id": "oneway-arrows", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "oneway"], true]], "type": "symbol", "paint": {"icon-color": "#ccf"}, "layout": {"icon-image": "oneway", "symbol-spacing": 200, "symbol-placement": "line", "icon-padding": 5} },
{ "id": "oneway-arrows", "source": "jawg-streets", "source-layer": "road", "minzoom": 17.0, "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "oneway"], true]], "type": "symbol", "paint": {"icon-color": "#ccf"}, "layout": {"icon-image": "oneway-arrow", "icon-size": ["interpolate", ["exponential", 2], ["zoom"], 17.0, 0.25, 24.0, 16.0], "symbol-spacing": ["interpolate", ["exponential", 2], ["zoom"], 17.0, 200.0, 24.0, 12800.0], "symbol-placement": "line", "icon-padding": 5, "icon-rotate": 90, "icon-rotation-alignment": "map"} },
{ "id": "boundaries", "source": "jawg-streets", "source-layer": "admin", "filter": ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], true]], "type": "line","paint": {"line-color": "#e72", "line-width": 1, "line-dasharray": [1, 2]} },
{ "id": "labels-country", "source": "jawg-streets", "source-layer": "place_label", "filter": ["==", ["get", "class"], "country"], "type": "symbol", "paint": {"text-color": "#ccf", "text-halo-color": "#2e2e48", "text-halo-width": 2.5}, "layout": {"text-field": ["coalesce", ["get", "name"]], "text-size": ["interpolate", ["exponential", 2], ["zoom"], 1.0, 13.0, 24.0, 64.0], "text-font": ["Roboto Bold", "Noto Bold"], "text-padding": 12, "symbol-sort-key": ["get", "scalerank"]} },
{ "id": "labels-localities", "source": "jawg-streets", "source-layer": "place_label", "filter": ["==", ["get", "class"], "locality"], "type": "symbol", "paint": {"text-color": "#ccf", "text-halo-color": "#2e2e48", "text-halo-width": 2.5}, "layout": {"text-field": ["coalesce", ["get", "name"]], "text-size": ["interpolate", ["exponential", 2], ["zoom"], 1.0, 13.0, 24.0, 64.0], "text-font": ["Roboto Regular", "Noto Regular"], "text-padding": 12, "symbol-sort-key": ["get", "scalerank"]} },
Expand Down
3 changes: 2 additions & 1 deletion demo/streetcomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"transition": { "duration": 300, "delay": 0 },
"light": { "intensity": 0.2 },
"glyphs": "https://api.jawg.io/glyphs/{fontstack}/{range}.pbf",
"sprite": "https://streetcomplete.app/map-jawg/sprites",
"layers": [
{ "id": "background", "type": "background", "paint": {"background-color": "#f3eacc"}},
{ "id": "landuse-town", "source": "jawg-streets", "source-layer": "landuse", "minzoom": 11.0, "filter": ["!", ["in", ["get", "class"], ["literal", ["pitch", "park", "grass", "cemetery", "wood", "scrub", "national_park"]]]], "type": "fill", "paint": { "fill-color": "#f3dacd", "fill-opacity": ["interpolate", ["exponential", 2], ["zoom"], 11.0, 0.0, 12.0, 1.0]} },
Expand Down Expand Up @@ -94,7 +95,7 @@
{ "id": "paths-bridge-private", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["==", ["get", "class"], "path"], ["==", ["geometry-type"], "LineString"], ["in", ["get", "access"], ["literal", ["no", "private", "destination", "customers", "delivery", "agricultural", "forestry", "emergency"]]], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#f3dacd", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 14.0, 0.25, 16.0, 0.5, 24.0, 128.0], "line-dasharray": [1, 2]},"layout": {"line-cap": "round", "line-join": "round"} },
{ "id": "roads-service-bridge-private", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["service", "driveway"]]], ["==", ["geometry-type"], "LineString"], ["in", ["get", "access"], ["literal", ["no", "private", "destination", "customers", "delivery", "agricultural", "forestry", "emergency"]]], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#f3dacd", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 13.0, 0.25, 16.0, 1.5, 24.0, 384.0], "line-dasharray": [1, 2]},"layout": {"line-cap": "round", "line-join": "round"} },
{ "id": "railways-bridge", "source": "jawg-streets", "source-layer": "road", "filter": ["all", ["in", ["get", "class"], ["literal", ["major_rail", "minor_rail"]]], ["==", ["geometry-type"], "LineString"], ["==", ["get", "structure"], "bridge"]], "type": "line","paint": {"line-color": "#99a", "line-width": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.75, 13.0, 2.0, 16.999, 4.0, 17.0, 2.0, 24.0, 128.0], "line-gap-width": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 17.0, 0.0, 24.0, 256.0], "line-opacity": ["interpolate", ["exponential", 2], ["zoom"], 12.0, 0.0, 13.0, 1.0]},"layout": {"line-join": "round"} },
{ "id": "oneway-arrows", "source": "jawg-streets", "source-layer": "road", "minzoom": 16.0, "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "oneway"], true]], "type": "symbol", "paint": {"icon-color": "#888"}, "layout": {"icon-image": "oneway", "symbol-spacing": 200, "symbol-placement": "line", "icon-padding": 5} },
{ "id": "oneway-arrows", "source": "jawg-streets", "source-layer": "road", "minzoom": 17.0, "filter": ["all", ["==", ["geometry-type"], "LineString"], ["==", ["get", "oneway"], true]], "type": "symbol", "paint": {"icon-color": "#888"}, "layout": {"icon-image": "oneway-arrow", "icon-size": ["interpolate", ["exponential", 2], ["zoom"], 17.0, 0.25, 24.0, 16.0], "symbol-spacing": ["interpolate", ["exponential", 2], ["zoom"], 17.0, 200.0, 24.0, 12800.0], "symbol-placement": "line", "icon-padding": 5, "icon-rotate": 90, "icon-rotation-alignment": "map"} },
{ "id": "boundaries", "source": "jawg-streets", "source-layer": "admin", "filter": ["all", ["==", ["get", "admin_level"], 2], ["!=", ["get", "maritime"], true]], "type": "line","paint": {"line-color": "#e39", "line-width": 1, "line-dasharray": [1, 2]} },
{ "id": "labels-country", "source": "jawg-streets", "source-layer": "place_label", "filter": ["==", ["get", "class"], "country"], "type": "symbol", "paint": {"text-color": "#124", "text-halo-color": "#fff", "text-halo-width": 2.5}, "layout": {"text-field": ["coalesce", ["get", "name"]], "text-size": ["interpolate", ["exponential", 2], ["zoom"], 1.0, 13.0, 24.0, 64.0], "text-font": ["Roboto Bold", "Noto Bold"], "text-padding": 12, "symbol-sort-key": ["get", "scalerank"]} },
{ "id": "labels-localities", "source": "jawg-streets", "source-layer": "place_label", "filter": ["==", ["get", "class"], "locality"], "type": "symbol", "paint": {"text-color": "#124", "text-halo-color": "#fff", "text-halo-width": 2.5}, "layout": {"text-field": ["coalesce", ["get", "name"]], "text-size": ["interpolate", ["exponential", 2], ["zoom"], 1.0, 13.0, 24.0, 64.0], "text-font": ["Roboto Regular", "Noto Regular"], "text-padding": 12, "symbol-sort-key": ["get", "scalerank"]} },
Expand Down

0 comments on commit 271b092

Please sign in to comment.